/* ────────────────────────────────────────────────────────────────────────────
 * Tailwind source — input for `npm run build:css`
 *
 * This file replaces the previous CDN runtime (`cdn.tailwindcss.com`) and the
 * inline `\3c style type="text/tailwindcss">...\3c /style>` block that lived in
 * index.html through v1.0. Strict CSP (`script-src 'self'; style-src 'self'`)
 * forbids the CDN's runtime JIT (which writes to a `\3c style>` tag), so we
 * pre-build this source file to `/css/tailwind.css` and ship the static asset.
 *
 * Body content below — `@apply` directives + component classes — is copied
 * verbatim from the v1.0 inline `\3c style type="text/tailwindcss">` block.
 * Preserving every selector and rule is the contract for visual parity.
 * ──────────────────────────────────────────────────────────────────────────── */

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/* ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com */

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.\!container {
  width: 100% !important;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .\!container {
    max-width: 640px !important;
  }

  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .\!container {
    max-width: 768px !important;
  }

  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .\!container {
    max-width: 1024px !important;
  }

  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .\!container {
    max-width: 1280px !important;
  }

  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .\!container {
    max-width: 1536px !important;
  }

  .container {
    max-width: 1536px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.visible {
  visibility: visible;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.min-w-0 {
  min-width: 0px;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.flex-col {
  flex-direction: column;
}

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

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-7 {
  gap: 1.75rem;
}

.self-start {
  align-self: flex-start;
}

.overflow-hidden {
  overflow: hidden;
}

.border {
  border-width: 1px;
}

.font-inter {
  font-family: Inter, system-ui, sans-serif;
}

.font-sora {
  font-family: Sora, system-ui, sans-serif;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.leading-tight {
  line-height: 1.25;
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.text-white\/60 {
  color: rgb(255 255 255 / 0.6);
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* WCAG note: .btn-cta contrast is ~2.85:1 (below AA 4.5:1). Accepted as brand trade-off matching brand_assets/header-template.html verbatim. See POLISH-04. */

/* ─── CTA button — orange, pulsing (verbatim from header-template.html) ─── */

@keyframes statsGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(249,115,22,0.7), 0 4px 14px -2px rgba(249,115,22,0.45);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(249,115,22,0), 0 4px 20px 0px rgba(249,115,22,0.2);
    transform: scale(1.03);
  }
}

.btn-cta {
  border-radius: 0.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  background-color: #f97316;
  animation: statsGlow 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  transition: filter 150ms ease, transform 100ms ease;
  outline-offset: 2px;
}

.btn-cta:hover  {
  filter: brightness(1.12);
}

.btn-cta:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.5);
}

.btn-cta:active {
  transform: scale(0.97) !important;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta {
    animation: none;
  }
}

/* ─── Ghost button — white outline, transparent fill, inverts on hover ─── */

.btn-ghost {
  border-radius: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  border: 1.5px solid rgba(255,255,255,0.65);
  background: transparent;
  transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;
  outline-offset: 2px;
}

.btn-ghost:hover {
  background-color: rgba(255,255,255,1);
  color: #0f172a;
}

.btn-ghost:focus-visible {
  outline: 2px solid rgba(255,255,255,0.8);
  outline-offset: 3px;
}

.btn-ghost:active {
  transform: scale(0.97);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost:disabled:hover {
  background-color: transparent;
  color: white;
}

/* ─── Icon-ghost button — 40px square variant, same interaction contract ─── */

.btn-icon-ghost {
  border-radius: 0.5rem;
  font-family: Inter, system-ui, sans-serif;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.65);
  background: transparent;
  transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;
  outline-offset: 2px;
}

.btn-icon-ghost:hover {
  background-color: rgba(255,255,255,1);
  color: #0f172a;
}

.btn-icon-ghost:focus-visible {
  outline: 2px solid rgba(255,255,255,0.8);
  outline-offset: 3px;
}

.btn-icon-ghost:active {
  transform: scale(0.97);
}

/* Size modifiers */

.btn-cta.btn-sm, .btn-ghost.btn-sm {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.btn-icon-ghost.btn-sm {
  width: 2rem;
  height: 2rem;
}

/* ─── Shadow tokens — layered, color-tinted (Phase 2 cards, Phase 3 modals) ─── */

.shadow-base {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.45),
    0 8px 24px -8px rgba(14, 116, 144, 0.35);
}

.shadow-elevated {
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.55),
    0 16px 40px -8px rgba(249, 115, 22, 0.45);
}

/* ─── Tile card — frosted glass, spring hover, orange focus ring ─── */

.tile-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
  max-width: 400px;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 200ms ease;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.45),
    0 8px 24px -8px rgba(14, 116, 144, 0.35);
}

.tile-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.55),
    0 16px 40px -8px rgba(249, 115, 22, 0.45);
}

.tile-card:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.5);
}

.tile-card:active {
  transform: scale(0.98);
}

/* ─── Category pill — muted badge ─── */

.tile-category {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-family: Inter, system-ui, sans-serif;
}

/* ─── Empty state — centered fallback when no tiles loaded ─── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 40vh;
}

/* ─── Ring tile — 3D-positioned card in the carousel ─── */

.ring-tile {
  position: absolute;
  width: 300px;
  left: 50%;
  margin-left: -150px;
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 300ms ease;
}

/* ─── Ring container rotation transition ─── */

#ring-container {
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Ring stage active state (when 3D ring is showing) ─── */

.ring-active {
  height: 45vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Ring arrow buttons (flanking left/right) ─── */

.ring-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.ring-arrow--left {
  left: 1rem;
}

.ring-arrow--right {
  right: 1rem;
}

/* ─── Focused tile — scale, shadow, pointer-events ─── */

.ring-tile {
  pointer-events: none;
}

.ring-tile--focused {
  pointer-events: auto !important;
}

.ring-tile--focused .tile-card {
  transform: scale(1.25);
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 300ms ease,
              background 250ms ease,
              border-color 250ms ease;
}

/* ─── Rim glow keyframe — pulsing orange halo (2.4s, matches statsGlow rhythm) ─── */

@keyframes rimGlow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(249,115,22,0.5),
      0 4px 12px rgba(15,23,42,0.55),
      0 16px 40px -8px rgba(249,115,22,0.45);
  }

  50% {
    box-shadow:
      0 0 0 6px rgba(249,115,22,0),
      0 4px 12px rgba(15,23,42,0.55),
      0 16px 40px -8px rgba(249,115,22,0.3);
  }
}

.ring-tile--focused .tile-card {
  animation: rimGlow 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ─── Focused tile hover — solid background for readability ─── */

.ring-tile--focused .tile-card:hover {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Focused tile description + category reveal ─── */

.ring-tile--focused .ring-tile__details,
.ring-tile--focused .tile-category {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ─── Focus-visible ring on focused tile card ─── */

.ring-tile--focused .tile-card:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.5),
              0 0 0 0 rgba(249,115,22,0.5),
              0 4px 12px rgba(15,23,42,0.55),
              0 16px 40px -8px rgba(249,115,22,0.45) !important;
}

/* ─── Ring container focus — delegate visual to focused tile card ─── */

#ring-container:focus-visible {
  outline: none;
}

/* ─── Reduced-motion overrides for ring ─── */

@media (prefers-reduced-motion: reduce) {
  .ring-tile {
    transition: none !important;
  }

  #ring-container {
    transition: none !important;
  }

  .ring-tile--focused .tile-card {
    animation: none;
  }
}

/* ─── Edit mode banner — orange accent bar at top of page ─── */

.edit-banner {
  background: #f97316;
  height: 3px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: opacity 200ms ease;
}

/* ─── Edit mode toolbar — frosted glass row below header ─── */

.edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-right: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

/* ─── Active state for edit mode toggle button ─── */

.btn-ghost.btn-active {
  background: rgba(249, 115, 22, 0.15);
  border-color: #f97316;
  color: #f97316;
}

.btn-ghost.btn-active:hover {
  background: rgba(249, 115, 22, 0.25);
  color: #f97316;
}

/* ─── Add-tile ghost card — dashed border placeholder ─── */

.add-tile-card {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  cursor: pointer;
  max-width: 400px;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.add-tile-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.05);
}

.add-tile-card:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.5);
}

.add-tile-card:active {
  transform: scale(0.98);
}

/* ─── Tile edit controls overlay (pencil/trash) ─── */

.tile-edit-controls {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

/* ─── Export badge — pulsing orange dot ─── */

/* ─── Modal + form styles (Phase 3) ─── */

dialog {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  max-width: none;
  max-height: none;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal-surface {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: min(90vw, 480px);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.55),
    0 16px 40px -8px rgba(249, 115, 22, 0.45);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  display: block;
  box-sizing: border-box;
  transition: border-color 150ms ease;
}

.form-input:focus {
  border-color: #f97316;
}

.form-input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-error {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1rem;
  color: #f87171;
  margin: 0.25rem 0 0;
  min-height: 1.25rem;
}

.form-input.has-error {
  border-color: #f87171;
}

/* ─── Icon picker grid cell ─── */

.icon-cell {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.icon-cell:hover {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.3);
}

.icon-cell:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.5);
}

.icon-cell:active {
  transform: scale(0.95);
  transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.icon-cell.selected {
  background: rgba(249,115,22,0.2);
  border-color: #f97316;
}

/* ─── Import error toast ─── */

.import-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(248,113,113,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  z-index: 60;
  transition: opacity 300ms ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
