:root {
  --portal-accent: #f59e0b;
  --portal-accent-hover: #d97706;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --ink-950: #0b0a08;
  --stone-100: #f4f2ee;
  --stone-200: #e7e5e0;
  --stone-600: #57534e;
  --stone-800: #292524;
  --stone-900: #1c1917;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: var(--stone-100);
  color: var(--stone-900);
  -webkit-font-smoothing: antialiased;
}

.portal-live-preview,
.portal-shell {
  width: 1280px;
  height: 720px;
  font-family: var(--font-sans);
  background: var(--stone-100);
  color: var(--stone-900);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.portal-shell {
  display: flex;
  min-height: 720px;
  min-width: 1280px;
}

.portal-sidebar {
  width: 14rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--stone-200);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 1rem;
  height: 4rem;
  border-bottom: 1px solid var(--stone-200);
  flex-shrink: 0;
}

.portal-sidebar-logo-wrap {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.portal-sidebar-logo-wrap[data-shape='square'] {
  border-radius: 0;
}

.portal-sidebar-logo-wrap[data-shape='circle'] {
  border-radius: 50%;
}

.portal-sidebar-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}

.portal-sidebar-logo-wrap[data-shape='square'] .portal-sidebar-logo {
  border-radius: 0;
}

.portal-sidebar-logo-wrap[data-shape='rounded'] .portal-sidebar-logo {
  border-radius: 1rem;
}

.portal-sidebar-logo-wrap[data-shape='circle'] .portal-sidebar-logo {
  border-radius: 50%;
}

.portal-sidebar-logo-fallback {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--portal-accent);
  color: var(--ink-950);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-sidebar-titles {
  min-width: 0;
}

.portal-sidebar-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--stone-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-sidebar-tagline {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: #78716c;
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-sidebar-tagline.is-hidden {
  display: none;
}

.portal-sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.625rem;
  border-radius: 0.5rem;
  color: var(--stone-600);
  font-size: 0.875rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.portal-nav-item svg {
  flex-shrink: 0;
  color: #78716c;
}

.portal-nav-item.is-active {
  background: color-mix(in srgb, var(--portal-accent) 15%, transparent);
  color: color-mix(in srgb, var(--portal-accent) 85%, #000);
}

.portal-nav-item.is-active svg {
  color: var(--portal-accent);
}

.portal-nav-dot {
  margin-left: auto;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--portal-accent);
  flex-shrink: 0;
}

.portal-sidebar-foot {
  padding: 0.75rem 0.5rem 1rem;
  border-top: 1px solid var(--stone-200);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.portal-nav-item--muted {
  color: #78716c;
}

.portal-nav-item--logout {
  color: #78716c;
}

.portal-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-main {
  flex: 1;
  overflow: auto;
  padding: 2rem;
}

.portal-main-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.portal-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(231, 229, 224, 0.9);
  background: linear-gradient(135deg, #fff 0%, #fafaf9 55%, color-mix(in srgb, var(--portal-accent) 8%, #fff) 100%);
  padding: 2rem 2.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-hero::after {
  content: '';
  position: absolute;
  right: -4rem;
  top: -6rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--portal-accent) 15%, transparent);
  filter: blur(48px);
  pointer-events: none;
}

.portal-hero-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--portal-accent) 85%, #000);
}

.portal-hero-title {
  position: relative;
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--stone-900);
}

.portal-hero-title span {
  color: color-mix(in srgb, var(--portal-accent) 75%, #000);
}

.portal-hero-date {
  position: relative;
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--stone-600);
}

.portal-hero-lead {
  position: relative;
  margin: 1rem 0 0;
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--stone-600);
}

.portal-hero-lead strong {
  font-weight: 500;
  color: var(--stone-800);
}

.portal-section-head {
  margin-bottom: 1rem;
}

.portal-section-label {
  margin: 0;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78716c;
}

.portal-section-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--stone-600);
}

.portal-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.portal-module-card--span {
  grid-column: span 1;
}

.portal-module-card {
  border-radius: 1rem;
  border: 1px solid var(--stone-200);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-module-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.portal-module-icon--emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.portal-module-icon--accent {
  background: color-mix(in srgb, var(--portal-accent) 15%, transparent);
  color: color-mix(in srgb, var(--portal-accent) 70%, #000);
}

.portal-module-icon--sky {
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
}

.portal-module-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--stone-900);
}

.portal-module-card p {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--stone-600);
}

.portal-module-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: color-mix(in srgb, var(--portal-accent) 70%, #000);
  opacity: 0.85;
}

.portal-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.portal-quick-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--stone-200);
  background: #fff;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-quick-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #f5f5f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-600);
}

.portal-quick-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.portal-quick-copy strong {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--stone-800);
}

.portal-quick-copy span {
  font-size: 0.75rem;
  color: #78716c;
}

.portal-quick-arrow {
  flex-shrink: 0;
  color: #d6d3d1;
}

.hidden {
  display: none !important;
}
