/**
 * IT Outside the box — global theme
 * Dark/light tokens, glassmorphism, neon accents, layout utilities, and motion.
 */

/* -------------------------------------------------------------------------- */
/* Tokens                                                                      */
/* -------------------------------------------------------------------------- */

:root,
[data-theme="dark"] {
  --bg: #04060d;
  --bg-elevated: #0b1020;
  --surface: rgba(12, 18, 36, 0.72);
  --surface-strong: #10182c;
  --menu-bg: #0e162c;
  --text: #eef3ff;
  --text-muted: #9aa8c7;
  --border: rgba(130, 210, 255, 0.16);
  --border-strong: rgba(56, 232, 255, 0.55);
  --accent: #3cefff;
  --accent-2: #c084fc;
  --accent-3: #4ade80;
  --glow: rgba(60, 239, 255, 0.32);
  --glow-purple: rgba(192, 132, 252, 0.28);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  --header-bg: #070b16;
  --code-bg: #070d1a;
  --orb-a: #22d3ee;
  --orb-b: #a855f7;
  --orb-c: #2563eb;
  --grid: rgba(100, 210, 255, 0.07);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #e8eefc;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --menu-bg: #ffffff;
  --text: #0b1224;
  --text-muted: #4b5b78;
  --border: rgba(15, 40, 80, 0.12);
  --border-strong: rgba(2, 132, 199, 0.45);
  --accent: #0284c7;
  --accent-2: #7c3aed;
  --accent-3: #059669;
  --glow: rgba(2, 132, 199, 0.2);
  --glow-purple: rgba(124, 58, 237, 0.16);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  --header-bg: #f3f6ff;
  --code-bg: #0f172a;
  --orb-a: #38bdf8;
  --orb-b: #a78bfa;
  --orb-c: #60a5fa;
  --grid: rgba(15, 50, 90, 0.06);
  color-scheme: light;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                        */
/* -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(60, 239, 255, 0.35);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Ambient background: fluid aurora + faint digital mesh */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

.page-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.42;
  will-change: transform;
  mix-blend-mode: screen;
}

[data-theme="light"] .page-bg-blob {
  mix-blend-mode: multiply;
  opacity: 0.28;
  filter: blur(80px);
}

.page-bg-blob-a {
  width: 52vw;
  height: 52vw;
  min-width: 22rem;
  min-height: 22rem;
  left: -12vw;
  top: -18vh;
  background: radial-gradient(circle, var(--orb-a), transparent 68%);
  animation: fluid-a 22s ease-in-out infinite;
}

.page-bg-blob-b {
  width: 46vw;
  height: 46vw;
  min-width: 20rem;
  min-height: 20rem;
  right: -10vw;
  top: 8vh;
  background: radial-gradient(circle, var(--orb-b), transparent 68%);
  animation: fluid-b 28s ease-in-out infinite;
}

.page-bg-blob-c {
  width: 58vw;
  height: 38vw;
  min-width: 24rem;
  min-height: 16rem;
  left: 18vw;
  bottom: -16vh;
  background: radial-gradient(circle, var(--orb-c), transparent 70%);
  animation: fluid-c 26s ease-in-out infinite;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
  opacity: 0.55;
}

@keyframes fluid-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12%, 18%, 0) scale(1.18); }
}

@keyframes fluid-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-16%, 10%, 0) scale(0.92); }
}

@keyframes fluid-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-8%, -14%, 0) scale(1.22); }
}

/* -------------------------------------------------------------------------- */
/* Glass surfaces                                                              */
/* -------------------------------------------------------------------------- */

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.glass-hover {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.glass-hover:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--glow), 0 20px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/* Header                                                                      */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 18px var(--glow);
}

.icon-btn .icon-sun,
[data-theme="light"] .icon-btn .icon-moon {
  display: none;
}

[data-theme="light"] .icon-btn .icon-sun {
  display: block;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  max-height: calc(100dvh - 4.25rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--header-bg);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel .nav-link {
  display: block;
  width: 100%;
  padding: 0.55rem 0;
}

@media (min-width: 1024px) {
  .mobile-panel {
    display: none !important;
  }

  .nav-hamburger {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Buttons & chips                                                             */
/* -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.925rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #041016;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 8px 24px var(--glow);
}

[data-theme="light"] .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 16px var(--glow);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
}

.status-dev {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
}

.status-roll {
  color: var(--accent-2);
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.12);
}

.status-live {
  color: var(--accent-3);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
}

.status-cancel {
  color: var(--text-muted);
  opacity: 0.85;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-btn.is-on {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(34, 211, 238, 0.14);
  box-shadow: 0 0 14px var(--glow);
}

.filter-btn.is-on.status-dev,
.filter-btn.is-on.status-roll,
.filter-btn.is-on.status-live,
.filter-btn.is-on.status-cancel {
  box-shadow: none;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                        */
/* -------------------------------------------------------------------------- */

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-scan {
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(from 180deg at 50% 50%, transparent, var(--glow), transparent 30%);
  animation: spin 22s linear infinite;
  opacity: 0.45;
  pointer-events: none;
}

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(105deg, var(--text) 10%, var(--accent) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------------- */
/* Forms                                                                       */
/* -------------------------------------------------------------------------- */

.field,
.select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field::placeholder {
  color: var(--text-muted);
}

.field:focus,
.select:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--glow);
}

.select option {
  background: var(--bg-elevated);
  color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* Code                                                                        */
/* -------------------------------------------------------------------------- */

pre[class*="language-"] {
  border-radius: 14px !important;
  border: 1px solid var(--border);
  background: var(--code-bg) !important;
}

#script-list {
  min-width: 0;
}

#script-list > article {
  min-width: 0;
  max-width: 100%;
}

#script-list article p {
  overflow-wrap: anywhere;
}

#script-list pre,
#script-list pre[class*="language-"] {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.8rem;
  white-space: pre;
  word-wrap: normal;
}

@media (max-width: 640px) {
  #script-tags .filter-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  #script-list pre,
  #script-list pre[class*="language-"] {
    font-size: 0.72rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Roadmap UI                                                                  */
/* -------------------------------------------------------------------------- */

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--border) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 10px;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.field-area {
  min-height: 8.5rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.warn-banner {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-view][hidden] {
  display: none !important;
}

html[data-route]:not([data-route="home"]) [data-view="home"] {
  display: none !important;
}

.sku-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.sku-page > main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sku-page-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: 1.15rem;
  padding-bottom: 1.25rem;
}

.sku-page-intro {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.sku-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sku-table-wrap {
  overflow-x: auto;
}

.sku-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.sku-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 var(--border);
}

.sku-table th,
.sku-table td {
  padding: 0.42rem 0.65rem;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-col-name {
  width: auto;
}

.sku-col-id {
  width: 22rem;
}

.sku-col-guid {
  width: 18rem;
}

.sku-table td:nth-child(2) code,
.sku-table td:nth-child(3) code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  line-height: 1.35;
}

.sku-name-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-name-btn:hover,
.sku-name-btn:focus-visible {
  text-decoration: underline;
  outline: none;
}

.sku-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.sku-modal[hidden] {
  display: none;
}

.sku-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .sku-modal-backdrop {
  background: rgba(243, 247, 255, 0.62);
}

.sku-modal-panel {
  position: relative;
  z-index: 1;
  width: min(46rem, 100%);
  max-height: min(80vh, 42rem);
  overflow: auto;
  padding: 1.2rem 1.3rem 1.35rem;
  border-radius: 1.25rem;
}

.sku-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.sku-modal-meta {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.sku-modal-meta code {
  font-size: 0.72rem;
}

.sku-plan-table {
  font-size: 0.8rem;
}

.sku-plan-table th:nth-child(2),
.sku-plan-table td:nth-child(2),
.sku-plan-table th:nth-child(3),
.sku-plan-table td:nth-child(3) {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sku-plan-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .sku-toolbar {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 1023px) {
  .sku-table .sku-col-guid,
  .sku-table th:nth-child(3),
  .sku-table td:nth-child(3) {
    display: none;
  }

  .sku-col-id {
    width: 42%;
  }

  .sku-table th,
  .sku-table td {
    padding: 0.5rem 0.45rem;
  }
}

.star-btn.is-on {
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: 0 0 14px var(--glow);
}

/* -------------------------------------------------------------------------- */
/* Motion                                                                      */
/* -------------------------------------------------------------------------- */

.fade-in {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.45s; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* -------------------------------------------------------------------------- */
/* Admin reference hub                                                         */
/* -------------------------------------------------------------------------- */

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.hub-grid pre,
#tool-graph-out {
  margin: 0;
  padding: 0.85rem 1rem;
  overflow: auto;
  background: var(--code-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-more {
  position: relative;
}

.nav-more-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.nav-more-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.85rem);
  right: 0;
  min-width: 13.5rem;
  padding: 0.7rem 0.55rem 0.55rem;
  border-radius: 14px;
  z-index: 60;
  background: var(--menu-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-more.is-open .nav-more-panel {
  display: grid;
  gap: 0.15rem;
}

.nav-more-label,
.mobile-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0.45rem 0.4rem;
}

.nav-more-panel .nav-link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.nav-more-panel .nav-link:hover,
.nav-more-panel .nav-link.is-active {
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--border);
}

.nav-more-panel .nav-link.is-active::after,
.mobile-panel .nav-link.is-active::after {
  display: none;
}

.mobile-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.mobile-group-label {
  margin: 0 0 0.35rem;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
}

.search-modal[hidden] {
  display: none;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .search-modal-backdrop {
  background: rgba(243, 247, 255, 0.7);
}

.search-modal-panel {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  max-height: min(70vh, 36rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 0.85rem;
  background: var(--menu-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.search-hits {
  overflow: auto;
  margin-top: 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.search-hit {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.search-hit:hover,
.search-hit.is-on {
  border-color: var(--border-strong);
  background: var(--surface);
}

.hero-search {
  width: 100%;
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
}

.ext-link::after {
  content: "↗";
  margin-left: 0.3rem;
  font-size: 0.75em;
  opacity: 0.7;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.code-toolbar span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

article[id] {
  scroll-margin-top: 5.5rem;
}

.hub-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ref-table th,
.ref-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.ref-table th {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.check-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.check-item input {
  margin-top: 0.25rem;
}

.check-item.is-done span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.path-steps {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--accent);
}

.hub-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .hub-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .hub-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .portal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .portal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portal-tile {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1.15rem;
  cursor: grab;
  min-width: 0;
}

.portal-tile:active {
  cursor: grabbing;
}

.portal-tile.is-dragging {
  opacity: 0.45;
}

.portal-tile.is-over {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.portal-tile-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.portal-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px;
}

.portal-grip {
  margin-left: auto;
  letter-spacing: -0.15em;
  color: var(--text-muted);
  font-size: 0.85rem;
  user-select: none;
}

.role-list {
  display: grid;
  gap: 0.55rem;
}

.role-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0.85rem 1rem;
}

.role-row-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.role-row-portal {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.role-row-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .role-row-head {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.status-today {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.22);
}

.status-yesterday {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
}

[data-theme="light"] .status-today {
  color: #047857;
  background: rgba(16, 185, 129, 0.18);
}

[data-theme="light"] .status-yesterday {
  color: #047857;
  background: rgba(52, 211, 153, 0.12);
}

.roadmap-fresh-today {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.55);
}

.roadmap-fresh-yesterday {
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Layout utilities (replaces Tailwind CDN)                                    */
/* -------------------------------------------------------------------------- */

.relative { position: relative; }
.z-10 { z-index: 10; }
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-24 { width: 6rem; }
.w-11\/12 { width: 91.666%; }
.w-10\/12 { width: 83.333%; }
.w-9\/12 { width: 75%; }
.w-4\/5 { width: 80%; }
.w-3\/5 { width: 60%; }
.w-2\/3 { width: 66.666%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-2 { margin-left: 0.5rem; }
.mt-auto { margin-top: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-10 { padding-top: 2.5rem; }
.pt-12 { padding-top: 3rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-14 { padding-bottom: 3.5rem; }
.pb-20 { padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration: underline; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.text-\[color\:var\(--text-muted\)\] { color: var(--text-muted); }
.text-\[color\:var\(--accent\)\] { color: var(--accent); }
.border-\[color\:var\(--border\)\] { border-color: var(--border); }
.space-y-5 > * + * { margin-top: 1.25rem; }
.\!px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.\!py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.\!py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }

@media (min-width: 640px) {
  .sm\:pt-16 { padding-top: 4rem; }
  .sm\:px-12 { padding-left: 3rem; padding-right: 3rem; }
  .sm\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .sm\:p-5 { padding: 1.25rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-end { align-items: flex-end; }
  .sm\:items-center { align-items: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .fade-in,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .page-bg-blob {
    animation: none !important;
    opacity: 0.28;
  }
}
