/* ==========================================================================
   Sky Creation Innovations - skycreation.dev
   Hand-written CSS. No framework, no build step.

   Layout primitives:
     .wrap      centred max-width container
     .section   vertical rhythm block
     .grid      auto-fitting card grid
     .card      surface panel
   ========================================================================== */

:root {
  --bg: #f8f9fa;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --text: #343a40;
  --muted: #596168;
  --accent: #0d6efd;
  --accent-ink: #ffffff;
  --accent-2: #0b5ed7;
  --border: #e9ecef;
  --border-strong: #dee2e6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 0.75rem;
  --max: 1400px;
  --gutter: 1.5rem;
  /* Hardware safe area insets (notches, Dynamic Island, home bar) */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  /* Full-bleed bars + one centred content column with safe-area protection. */
  --page-inline: max(calc(var(--gutter) + var(--sal)), calc((100% - var(--max)) / 2 + var(--gutter)));
  --page-inline-right: max(calc(var(--gutter) + var(--sar)), calc((100% - var(--max)) / 2 + var(--gutter)));
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #161b22;
  --surface-2: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #388bfd;
  --accent-ink: #ffffff;
  --accent-2: #58a6ff;
  --border: #30363d;
  --border-strong: #484f58;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -1px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.45), 0 4px 6px -2px rgba(0, 0, 0, 0.35);
}


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

html {
  scroll-behavior: smooth;
  /* Anchored headings must clear the sticky header and notch */
  scroll-padding-top: calc(5.5rem + var(--sat));
  scrollbar-gutter: stable;
  overflow-x: clip;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: var(--sab);
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-2);
}

/* Visible focus everywhere, for keyboard users. */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Accessibility helpers --------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
}

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

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: var(--page-inline);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  /* Full-bleed bar with safe-area padding for notches and Dynamic Island. */
  padding: calc(1rem + var(--sat)) var(--page-inline-right) 1rem var(--page-inline);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

:root[data-theme="dark"] .site-header {
  background: rgba(13, 17, 23, 0.95);
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
  order: 1;
  flex-shrink: 0;
}

.brand-logo {
  height: 20px;
  width: auto;
  border-radius: 3px;
  flex-shrink: 0;
}

/* .brand-mark removed — all pages now use the logo image */

.brand-name em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.1rem;
  order: 2;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Dropdown for secondary main-nav items (used if a category overflows). */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: " \25BE";
  font-size: 0.75em;
}

.nav-dropdown[open] > summary,
.nav-dropdown > summary:hover {
  color: var(--text);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 20;
}

.nav-dropdown-panel a {
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
}

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: var(--surface-2);
    color: var(--text);
  }

/* The founder portfolio is a separate subdomain (founder.skycreation.dev),
   sourced from site/founder/ in this repo. Marked so nobody expects to stay
   on skycreation.dev when they follow the nav link. */
.site-nav .nav-external {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  color: var(--accent-2);
}

.site-nav .nav-external:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.nav-external-mark {
  font-size: 0.85em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  order: 3;
  margin-left: 0.75rem;
  margin-right: 0.25rem;
  padding: 0.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface, var(--bg));
  flex-shrink: 0;
}

.lang-switch button {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.25rem 0.45rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface, var(--bg));
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  order: 4;
  margin-left: 0.25rem;
  margin-right: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateY(-1px);
}

html[lang="my"] body,
html[lang="th"] body {
  font-family: "Montserrat", "Noto Sans Myanmar", "Noto Sans Thai", system-ui, sans-serif;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 4.5rem var(--page-inline) 5rem;
}

/* Default marketing heroes are horizontally centred; split/admin stay composed. */
.hero:not(.hero-split):not(.admin-hero) {
  text-align: center;
}

.hero:not(.hero-split):not(.admin-hero) h1,
.hero:not(.hero-split):not(.admin-hero) .lede {
  margin-left: auto;
  margin-right: auto;
}

.hero:not(.hero-split):not(.admin-hero) .hero-actions {
  justify-content: center;
}

/* Two-column hero: text left, visual right */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  text-align: left;
}

.hero-text { /* contains eyebrow + h1 + lede + actions */ }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual svg {
  max-width: 360px;
  width: 100%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

/* Coloured accent word in headings (matches founder pattern) */
.accent-word { color: var(--accent); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 58ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

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

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Sections ----------------------------------------------------------- */

.section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 5rem var(--page-inline);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 60ch;
  margin-bottom: 2.5rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Centre CTAs and follow-on links under centred section heads. */
.section > .hero-actions {
  justify-content: center;
}

.section > .mt-md {
  text-align: center;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  font-weight: 800;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.section-head p,
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Featured project card — coloured top border, category badge */
.card-featured {
  border-top: 4px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.card-featured[data-color="green"] { border-top-color: #198754; }
.card-featured[data-color="orange"] { border-top-color: #fd7e14; }
.card-featured[data-color="sky"] { border-top-color: #0dcaf0; }

.card-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-bottom-left-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-featured[data-color="green"] .card-badge { background: #198754; }
.card-featured[data-color="orange"] .card-badge { background: #fd7e14; }
.card-featured[data-color="sky"] .card-badge { background: #0dcaf0; color: #212529; }

.card-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin: 0.25rem 0 0.75rem;
}

.card-featured[data-color="green"] .card-subtitle { color: #198754; }
.card-featured[data-color="orange"] .card-subtitle { color: #b24a00; }
.card-featured[data-color="sky"] .card-subtitle { color: #087990; }

[data-theme="dark"] .card-featured[data-color="green"] .card-subtitle { color: #2ea043; }
[data-theme="dark"] .card-featured[data-color="orange"] .card-subtitle { color: #f0883e; }
[data-theme="dark"] .card-featured[data-color="sky"] .card-subtitle { color: #58a6ff; }


/* Technology pill-badges */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 1rem;
}

.pill {
  background: #e7f1ff;
  color: #0b5ed7;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
}

.card-featured[data-color="green"] .pill { background: #d1e7dd; color: #0f5132; }
.card-featured[data-color="orange"] .pill { background: #ffe5d0; color: #7d3000; }
.card-featured[data-color="sky"] .pill { background: #cff4fc; color: #055160; }

/* Stat strip */
.stats-strip {
  padding-top: 0;
  padding-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.4rem 0 0;
}

/* Cards stacked directly in a section, as opposed to a .grid of them. Spacing
   sits between siblings so the last card carries no trailing margin. */
.section > .card + .card {
  margin-top: 1rem;
}

.card p {
  color: var(--muted);
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 0.6rem;
}

/* --- Project / work list ------------------------------------------------ */

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.work-list li {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.work-name {
  font-weight: 600;
}

.work-desc {
  color: var(--muted);
  flex: 0 1 auto;
  text-align: center;
}

.work-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  justify-content: center;
}

/* --- Facebook posts ---------------------------------------------------- */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
}

.post-date {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 0.4rem;
}

.post-text {
  margin: 0;
  white-space: pre-line; /* keep line breaks from the original post */
}

.post-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Prose pages -------------------------------------------------------- */

.prose {
  max-width: 68ch;
  margin-inline: auto;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose ul {
  padding-left: 1.15rem;
  color: var(--muted);
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li strong {
  color: var(--text);
}

/* --- Person block ------------------------------------------------------- */

.person {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 52rem;
  margin-inline: auto;
}

.person-initials {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.person-body {
  flex: 1 1 20rem;
}

/* --- Values list -------------------------------------------------------- */

.values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.values li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.values strong {
  display: block;
  margin-bottom: 0.15rem;
}

.values span {
  color: var(--muted);
}

/* --- Social links ------------------------------------------------------- */

.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.social-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.social-list li > a {
  flex: 1;
  min-width: 0;
}

.social-list li .btn-copy {
  margin-left: 0;
  flex-shrink: 0;
}

.social-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.social-list a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.social-list span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
}

/* --- Contact form ------------------------------------------------------- */

.form {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Honeypot: hidden from humans, reachable by naive bots. */
.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  min-height: 1.5em;
}

.form-status[data-state="success"] {
  color: var(--accent-2);
}

.form-status[data-state="error"] {
  color: #dc3545;
}

.form-status[data-state="pending"] {
  color: var(--muted);
}

/* --- CTA band ----------------------------------------------------------- */

.cta {
  text-align: center;
}

.cta .section-head {
  margin-inline: auto;
}

.cta .hero-actions {
  justify-content: center;
}

/* --- Spacing utilities -------------------------------------------------- */
/* These replaced one-off style attributes. Spacing now lives in this file and
   can be changed in one place instead of page by page. */

.mt-sm {
  margin-top: 1rem;
}

.mt-md {
  margin-top: 1.5rem;
}

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

.site-footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2.5rem var(--page-inline-right) calc(3rem + var(--sab)) var(--page-inline);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

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

.footer-blurb {
  margin: 0 0 0.5rem;
  max-width: 36rem;
  font-size: 0.9rem;
}

.footer-copy {
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Legacy: pages that still have bare <a> in footer */
.site-footer a {
  color: var(--muted);
}

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

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-sidebar button {
    flex: 1 1 auto;
    text-align: center;
  }

  .nav-toggle {
    display: inline-block;
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 1.5rem;
    margin: 0 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0.3s;
    visibility: hidden;
    order: 5;
  }

  .lang-switch {
    order: 3;
    margin-left: 0.4rem;
    margin-right: 0.2rem;
  }

  .theme-toggle {
    order: 4;
    margin-left: 0.2rem;
    margin-right: 0;
  }

  .site-nav[data-open="true"] {
    max-height: 28rem;
    opacity: 1;
    padding: 0.75rem 1.25rem 1rem;
    visibility: visible;
  }

  .site-nav a {
    padding: 0.75rem 0.75rem;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > summary {
    padding: 0.75rem 0.75rem;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 0.75rem;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }

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

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

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #0dcaf0);
  width: 0%;
  z-index: 999;
  transition: width 0.1s cubic-bezier(0.1, 0.5, 0.1, 1);
  pointer-events: none;
}

/* --- Active Nav Link Indicator --- */
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Pulsing Status Badges --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.status-live {
  background: #d1e7dd;
  color: #0f5132;
}

.status-desktop {
  background: #cff4fc;
  color: #055160;
}

.status-tool {
  background: #e7f1ff;
  color: #0b5ed7;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
  position: relative;
  display: inline-block;
}

.status-live .status-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.8;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* --- Project Filter Tabs --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.card-featured.is-hidden {
  display: none;
}

/* --- Toast Notification & Utilities --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #212529;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.btn-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(13, 110, 253, 0.05);
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* --- Back to Top (symbol only; label stays on aria-label / title) --- */
.back-to-top {
  position: fixed;
  bottom: calc(2rem + var(--sab));
  left: calc(2rem + var(--sal));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 90;
  font-size: 0;
  line-height: 0;
  padding: 0;
}

.back-to-top::before {
  content: "\2191";
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* --- Hero Canvas & Math Playground --- */
.hero-canvas {
  width: 100%;
  max-width: 360px;
  height: 320px;
  border-radius: var(--radius);
  display: block;
}

.math-playground {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}

.math-canvas {
  width: 100%;
  height: 240px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: block;
}

.math-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.math-control-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.math-slider {
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}

.math-formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--accent-2);
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: #e7f1ff;
  border-radius: 6px;
  display: inline-block;
}

:root[data-theme="dark"] .math-formula {
  background: rgba(56, 139, 253, 0.15);
  color: #58a6ff;
}

.math-preset-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.math-telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.telemetry-pill {
  font-size: 0.82rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  color: var(--text);
}

.telemetry-pill strong {
  color: var(--accent);
}

/* --- SCI Exchange App Styles (Clean & Simple) -------------------------- */

.converter-wrap {
  max-width: 520px;
  margin: 0 auto;
}

.converter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.converter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.converter-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.converter-field {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.converter-field:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.converter-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.converter-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.converter-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  font-family: inherit;
  padding: 0;
  -moz-appearance: textfield;
}

.converter-input::-webkit-outer-spin-button,
.converter-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.converter-input:focus {
  outline: none;
}

.converter-input:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.converter-tag {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  background: #e7f1ff;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: 0.75rem;
}

.converter-swap-wrap {
  display: flex;
  justify-content: center;
  margin: 0.6rem 0;
}

.converter-swap-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  transition: transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.converter-swap-btn:hover {
  transform: rotate(180deg);
  border-color: var(--accent);
  background: #e7f1ff;
}

.converter-meta {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.converter-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.converter-meta-row:last-child {
  margin-bottom: 0;
}

.converter-meta-row strong {
  color: var(--text);
  font-weight: 700;
}

.rate-edit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.rate-input-inline {
  width: 95px;
  min-width: 90px;
  padding: 0.2rem 0.45rem;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  text-align: center;
  box-sizing: border-box;
  -moz-appearance: textfield;
}

.rate-input-inline::-webkit-outer-spin-button,
.rate-input-inline::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rate-input-inline:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
}

.rate-input-inline:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.btn-rate-mini {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-rate-mini:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #e7f1ff;
}

.converter-actions {
  display: grid;
  gap: 0.75rem;
}

@media (max-width: 580px) {
  .converter-card {
    padding: 1.5rem 1.25rem;
  }
  .converter-input {
    font-size: 1.4rem;
  }
}

/* --- Exchange: order creation, tracking, admin ----------------------------- */

.order-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* A .field can either be a <div> (contact form) or a <label class="field">. */
.field > span {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field select {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
}

.field select:focus {
  border-color: var(--accent);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 580px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* --- order timeline and status badges --- */

.ex-status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border-strong);
}

.ex-status-badge[data-status="PENDING"] {
  background: #fff3cd;
  color: #664d03;
  border-color: #ffecb5;
}

.ex-status-badge[data-status="APPROVED"] {
  background: #cff4fc;
  color: #055160;
  border-color: #b6effb;
}

.ex-status-badge[data-status="COMPLETED"] {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}

.ex-status-badge[data-status="REJECTED"] {
  background: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
}

.ex-timeline {
  margin-top: 1rem;
}

.ex-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
  padding-bottom: 1.1rem;
}

.ex-timeline-step:last-child {
  padding-bottom: 0;
}

.ex-timeline-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
  border: 2px solid var(--surface);
  margin-top: 0.3rem;
  box-shadow: 0 0 0 1px var(--border-strong);
}

.ex-timeline-done .ex-timeline-dot {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2);
}

.ex-timeline-step::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 15px;
  bottom: 0;
  width: 2px;
  background: var(--border-strong);
}

.ex-timeline-step:last-child::before {
  display: none;
}

.status-inline {
  color: #842029;
  font-weight: 600;
}

/* --- order detail panel --- */

.ex-details {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.92rem;
}

.ex-details dt {
  color: var(--muted);
}

.ex-details dd {
  margin: 0;
}

.ex-proof {
  margin-top: 1.25rem;
}

.ex-proof-img {
  max-width: 100%;
  max-height: 420px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

/* --- guest order list on the tracking page --- */

.guest-orders {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guest-orders > * {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.guest-orders > *:last-child {
  border-bottom: 0;
}

/* --- admin panel --- */

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.admin-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  cursor: pointer;
}

.admin-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
}

.admin-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.ex-order-card {
  margin-bottom: 0.85rem;
}

.ex-order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.ex-order-card-line {
  margin: 0 0 0.35rem;
}

.ex-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.admin-rate-form {
  margin: 1rem 0;
  max-width: 340px;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.admin-history,
.admin-audit {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.admin-history li,
.admin-audit li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-history li:last-child,
.admin-audit li:last-child {
  border-bottom: 0;
}

/* --- Universal Adaptive Ad Banners (Zero Layout Impact) --- */

.crm-banner-mount {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--page-inline) 0;
}

.crm-banner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crm-banner-card:hover {
  border-color: var(--accent);
}

.crm-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-banner-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--surface-2);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.crm-banner-note {
  font-size: 0.78rem;
  color: var(--muted);
}

.crm-banner-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 80px;
  max-height: min(480px, 55vh);
  width: 100%;
}

.crm-banner-media {
  max-width: 100%;
  height: auto;
  max-height: min(480px, 55vh);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease;
}

.crm-banner-media-clickable {
  cursor: pointer;
}
.crm-banner-media-clickable:hover {
  transform: scale(1.008);
}

.crm-banner-video {
  max-width: 100%;
  height: auto;
  max-height: min(480px, 55vh);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #000;
}

.crm-banner-text-block {
  padding: 1.25rem 1rem;
  text-align: center;
  width: 100%;
}

.crm-banner-text {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.crm-banner-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.crm-banner-caption {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  flex: 1 1 200px;
}

.crm-banner-cta {
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* Backwards compatibility for legacy inner link wrapper */
.crm-banner-inner {
  display: block;
  text-decoration: none;
  color: inherit;
}

.admin-portal-picker {
  margin-bottom: 1.5rem;
}

.crm-comment {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

/* --- site-wide admin shell --- */

.admin-shell {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  overflow: hidden;
}

.admin-sidebar button {
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.admin-sidebar button:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.admin-sidebar button.active {
  color: var(--accent-ink);
  background: var(--accent);
}

.admin-sidebar button[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
}

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

.admin-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-subnav .btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}

.admin-actions-row h3 {
  margin: 0;
}

.admin-filter {
  margin-left: 0.5rem;
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.admin-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-admin-card {
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.post-editor {
  padding: 1rem;
  margin-bottom: 1rem;
}

.post-editor textarea,
.post-editor input {
  width: 100%;
}

/* --- confirm modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 420px;
  width: 100%;
  padding: 1.25rem;
}

.modal.admin-order-modal {
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
}

.admin-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-token-row code {
  word-break: break-all;
  font-size: 0.85rem;
}

.admin-series {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
}

.admin-series-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.admin-series-bar-track {
  background: var(--border);
  border-radius: var(--radius-sm);
  height: 0.65rem;
  overflow: hidden;
}

.admin-series-bar {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-sm);
  min-width: 2px;
}

/* --- company-page layout helpers (kept out of inline HTML for CSP) --- */

.person-initials-cover { object-fit: cover; }

.exchange-hero {
  padding-bottom: 2rem;
}

.exchange-lede { margin-inline: auto; max-width: 48ch; }
.exchange-track-link { margin-top: 0.5rem; }
.exchange-app-section { padding-top: 0; padding-bottom: 4rem; }

/* Moderated comments under CRM posts (Work / Math). */
.crm-comments {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.crm-comments-title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-comment-list {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
}

.crm-comment {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.crm-comment strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.crm-comment p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.crm-comment-form {
  display: grid;
  gap: 0.5rem;
}

.crm-comment-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.crm-comment-form input,
.crm-comment-form textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.crm-comment-form textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.crm-comment-form .btn {
  justify-self: start;
}

.calc-status { margin-bottom: 0; }
.calc-rate-display { font-weight: 700; color: var(--text); font-size: 0.9rem; }
.rate-unit { font-weight: 700; color: #212529; }
.fee-zero { color: #198754; }
.converter-action { width: 100%; }
.converter-contact { text-align: center; }
.section-head-left { text-align: left; }
.section-head-order { margin-bottom: 1rem; }
.section-head-created { margin-bottom: 0.75rem; }
.orders-hero { padding-bottom: 2rem; }
.orders-lede { margin-inline: auto; max-width: 46ch; }
.orders-section { padding-top: 0; padding-bottom: 4rem; }

/* Admin / form surfaces stay left-aligned inside the centred column. */
.admin-hero {
  text-align: left;
}

.admin-hero .hero-actions {
  justify-content: flex-start;
}

/* Order Lookup Card */
.order-lookup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.order-lookup-form .field {
  margin-bottom: 0;
}
.order-lookup-form .converter-input {
  width: 100%;
}

/* Quick Amount Chips */
.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
}
.amount-chip {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.amount-chip:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.amount-chip:active {
  transform: translateY(0);
}

/* Trust & Transparency Comparison Table */
.transparency-table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.transparency-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: var(--surface);
}
.transparency-table th,
.transparency-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.transparency-table th {
  background: var(--surface-2);
  font-weight: 700;
}
.transparency-table tr:last-child td {
  border-bottom: none;
}
.transparency-table .col-highlight {
  background: rgba(13, 110, 253, 0.05);
  font-weight: 600;
  color: var(--accent);
}
:root[data-theme="dark"] .transparency-table .col-highlight {
  background: rgba(56, 139, 253, 0.12);
}

/* Print Receipt Stylesheet */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .toast,
  .orders-hero,
  #guest-orders-list,
  #order-lookup-card,
  .print-receipt-btn,
  .ex-proof input,
  .scroll-progress,
  .theme-toggle,
  .lang-switch {
    display: none !important;
  }
  body, #main, .order-wrap, #order-detail {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    padding: 1.5rem !important;
  }
}

/* Studio Milestones & Person Avatar */
.person-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.timeline-wrap {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-strong);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-year {
  display: inline-block;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent);
  background: var(--surface-2);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  margin-bottom: 0.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 6px);
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.timeline-content h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.timeline-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- OS Window Chrome for Engineering Showcase --- */
.card-window {
  padding-top: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-window:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.os-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  margin: 0 -1.5rem 1.25rem -1.5rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--muted);
  user-select: none;
}

.window-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.window-dot-red { background: #ef4444; }
.window-dot-yellow { background: #f59e0b; }
.window-dot-green { background: #10b981; }

.window-title-bar {
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.window-sys-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--accent);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin: 1.15rem 0;
  padding: 0.85rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.spec-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.spec-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Transaction Progress Stepper --- */
.order-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 1.5rem 0 1.75rem;
  padding: 0 0.5rem;
}

.order-stepper::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: var(--border-strong);
  z-index: 1;
}

.stepper-progress-bar {
  position: absolute;
  top: 15px;
  left: 30px;
  height: 3px;
  background: var(--accent);
  z-index: 2;
  transition: width 0.4s ease;
}

.stepper-step {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  min-width: 80px;
}

.stepper-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s ease;
}

.stepper-step.active .stepper-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 12px var(--accent-glow, rgba(56, 189, 248, 0.4));
}

.stepper-step.completed .stepper-dot {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.stepper-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.stepper-step.active .stepper-label,
.stepper-step.completed .stepper-label {
  color: var(--text);
}

/* Direct Support Bridge */
.support-bridge {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.support-bridge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.support-bridge-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.support-bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-support-wa {
  background: #25d366;
  color: #fff !important;
  border-color: #25d366;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-support-wa:hover {
  background: #20bd5a;
  color: #fff !important;
}

.btn-support-tg {
  background: #229ed9;
  color: #fff !important;
  border-color: #229ed9;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-support-tg:hover {
  background: #1d8bc0;
  color: #fff !important;
}

/* Contact Project Category Chips */
.category-chips-wrap {
  margin-bottom: 1.25rem;
}

.category-chips-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-chip {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.category-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Post-Submit Roadmap Card */
.contact-roadmap-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--surface-2);
  border: 1px solid #10b981;
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}

.contact-roadmap-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
  margin: 0 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.contact-roadmap-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.roadmap-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text);
}

.roadmap-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

/* 404 Recovery Destination Jump Grid */
.jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.jump-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jump-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.jump-card-icon {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.jump-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.jump-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Live Placement Simulator for Media Kit */
.sim-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.sim-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sim-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sim-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.sim-select {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.sim-canvas {
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  position: relative;
}

.sim-surface-header {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.sim-preview-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  box-shadow: 0 0 15px var(--accent-glow, rgba(56, 189, 248, 0.15));
}

/* --- WCAG 2.1 AA & Accessibility Guards --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .stepper-progress-bar {
    transition: none !important;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS Safari automatic camera zoom-in on input focus */
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  select,
  textarea,
  .converter-input,
  .sim-select,
  .math-preset-select,
  .admin-filter {
    font-size: 16px !important;
  }

  /* Accessible touch targets & tap padding */
  .category-chip {
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .filter-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .amount-chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .theme-toggle,
  .lang-switch button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* --- Multi-OS Typography & Script Metrics Protection --- */
html[lang="my"] body,
html[lang="my"] button,
html[lang="my"] input,
html[lang="my"] select,
html[lang="my"] textarea {
  font-family: 'Noto Sans Myanmar', 'Montserrat', system-ui, -apple-system, sans-serif;
  line-height: 1.75;
}

html[lang="th"] body,
html[lang="th"] button,
html[lang="th"] input,
html[lang="th"] select,
html[lang="th"] textarea {
  font-family: 'Noto Sans Thai', 'Montserrat', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}

/* --- Pointer vs Touch Hover Optimization --- */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }
  .card-window:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }
  .btn:hover {
    transform: translateY(-1px);
  }
  .jump-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
  }
}

/* --- Extreme Narrow Screen Hardening (320px - 480px) --- */
.os-window-header {
  gap: 0.5rem;
}
.window-title-bar {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .brand-name em {
    display: none;
  }
  .window-title-bar {
    max-width: 130px;
    font-size: 0.72rem;
  }
  .window-sys-badge {
    display: none;
  }
  .spec-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.4rem;
    padding: 0.6rem;
  }
  .order-stepper {
    margin: 1rem 0 1.25rem;
    padding: 0;
  }
  .order-stepper::before {
    left: 20px;
    right: 20px;
  }
  .stepper-progress-bar {
    left: 20px;
  }
  .stepper-dot {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .stepper-label {
    font-size: 0.7rem;
  }
  .support-bridge-actions {
    flex-direction: column;
    width: 100%;
  }
  .support-bridge-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .jump-grid {
    grid-template-columns: 1fr;
    margin-top: 1.25rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .amount-chips {
    gap: 0.35rem;
  }
  .amount-chip {
    flex: 1 1 calc(33.333% - 0.35rem);
    padding: 0.4rem 0.2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 580px) {
  .sim-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .sim-group {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Windows High Contrast / Forced Colors --- */
@media (forced-colors: active) {
  .card,
  .card-window,
  .btn,
  .category-chip,
  .amount-chip,
  .stepper-dot,
  .os-window-header {
    border: 1px solid ButtonBorder !important;
  }
  .stepper-step.active .stepper-dot {
    background: Highlight !important;
    color: HighlightText !important;
  }
}

/* --- Admin Media Uploader & Library --- */
.ad-media-uploader {
  margin: 0.75rem 0 1rem;
}

.uploader-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.uploader-dropzone:hover,
.uploader-dropzone.dragover {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.uploader-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.uploader-title {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.uploader-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
}

.uploader-types {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0.35rem 0 0.5rem;
}

.uploader-status {
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-library-panel {
  margin: 0.75rem 0 1.25rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.media-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  text-align: center;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.media-item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.media-item-thumb {
  width: 100%;
  height: 75px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 4px;
}

.media-item-name {
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0.4rem 0 0.15rem;
}

.media-item-meta {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}



