/* css/styles.css */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #faf9f6; /* Warm paper color */
  --bg-tertiary: #f3f2ee;
  --accent-primary: #111111;
  --accent-secondary: #4b5563;
  --text-primary: #111111;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --max-width: 780px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background-color: var(--bg-primary);
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.25rem 0;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
}


/* Main Content Area */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 7rem 2rem;
}

.page {
  display: none;
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography styles inside articles */
.article-header {
  margin-bottom: 3.5rem;
  text-align: left;
}

.article-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.article-byline {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Article Content Body */
.article-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #1a1a1a;
}

.article-body p {
  margin-bottom: 1.8rem;
  text-align: justify;
}

.article-body h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 3.5rem 0 1.5rem 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-body h2::before {
  content: '§';
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 300;
}

/* Indented Poetry & Blockquotes */
.poetry-block {
  margin: 2rem 1.5rem;
  padding: 0;
  border: none;
  font-style: italic;
  font-family: 'Lora', Georgia, serif;
  line-height: 1.8;
  color: var(--text-secondary);
}

.poetry-block p {
  margin-bottom: 0.5rem;
  text-align: left;
}

.indented-poem-lines {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 2rem 0 2rem 3rem;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
}

.indented-poem-lines span {
  display: block;
}

/* Cover & inline Images (CSS graphics placeholders) */
.featured-image-container {
  margin: 3rem 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-secondary);
}

.image-caption {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* Footnotes styling */
.footnote-ref {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: super;
  text-decoration: none;
  color: var(--text-muted);
  margin-left: 1px;
  padding: 0;
  transition: var(--transition-smooth);
}

.footnote-ref:hover, .footnote-ref:focus, .footnote-ref.hover {
  color: var(--text-primary);
  text-decoration: underline;
  outline: none;
}

.footnotes-section {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footnotes-section h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footnotes-list {
  list-style: none;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footnote-item {
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
  scroll-margin-top: 100px;
}

.footnote-item.highlight {
  background-color: var(--bg-secondary);
  border-left: 2px solid var(--text-primary);
  padding-left: calc(0.5rem - 2px);
}

.footnote-back-ref {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: bold;
  margin-left: 0.5rem;
  transition: var(--transition-smooth);
}

.footnote-back-ref:hover {
  color: var(--text-primary);
}

/* Dynamic Interactive Popover for Footnotes */
.footnote-popover {
  position: absolute;
  z-index: 200;
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid #d1d5db;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.footnote-popover.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* About & Announcement Pages Styles */
.about-card, .announcement-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.about-card p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: #333333;
}

.announcement-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.announcement-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
}

.announcement-card p {
  color: #333333;
}

/* Page Titles */
.page-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  letter-spacing: -0.01em;
}

/* Footer Styling */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--bg-primary);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer a:hover {
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }
  
  .article-title {
    font-size: 2.2rem;
  }
  
  .meta-row {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
  }
  
  main {
    padding: 2.5rem 1rem 5rem 1rem;
  }
  
  .article-body p {
    text-align: left;
  }
}

/* Sidenotes / Margin Notes Layout */
@media (min-width: 1120px) {
  main {
    max-width: 1140px;
  }
  
  #journal, #about, #announcements {
    max-width: 780px;
    margin: 0 auto;
  }
  
  #article-deleuze {
    max-width: 1080px;
    margin: 0 auto;
  }

  .article-header {
    max-width: 700px;
    margin-left: 0;
    margin-right: auto;
  }
  
  .article-body {
    padding-right: 320px;
    position: relative;
  }
  
  /* Constrain the main reading column width inside the article body */
  .article-body > p,
  .article-body > h2,
  .article-body > .indented-poem-lines,
  .article-body > .featured-image-container,
  .article-body > ul,
  .article-body > ol {
    max-width: 700px;
    margin-left: 0;
    margin-right: auto;
  }

  .article-body > blockquote,
  .article-body > .poetry-block {
    max-width: 600px;
    margin-left: 3rem;
    margin-right: auto;
  }
  
  /* Sidenote/Margin note styling */
  .sidenote {
    position: absolute;
    right: 0;
    width: 270px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
    font-family: 'Lora', Georgia, serif;
    font-style: normal;
    text-align: left;
    transition: color var(--transition-smooth);
    z-index: 10;
  }
  
  .sidenote-number {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 0.3rem;
    font-size: 0.8rem;
  }
  
  /* Highlight state for hover or active clicks */
  .sidenote.active {
    color: var(--text-primary);
  }
  
  .sidenote.active .sidenote-number {
    color: var(--text-primary);
  }
  
  /* Hide the bottom footnotes section on desktop */
  .footnotes-section {
    display: none;
  }
}

@media (max-width: 1119px) {
  .sidenote {
    display: none; /* Hide margin notes in the text flow, relying on popovers and bottom section */
  }
}

/* Auth Gate */
#auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

.auth-container {
  text-align: center;
  padding: 2rem;
}

.auth-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.google-signin-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.auth-error {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #b91c1c;
  min-height: 1.2em;
}

/* Sign Out Button */
.sign-out-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sign-out-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Portal — Article Submission Form */
.portal-form {
  margin-bottom: 3rem;
}

.portal-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  outline: none;
  transition: var(--transition-smooth);
}

.portal-input:focus {
  border-color: var(--text-muted);
}

.portal-input::placeholder {
  color: var(--text-muted);
}

.portal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.portal-btn {
  padding: 0.6rem 1.2rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.portal-btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.portal-btn-secondary:hover {
  background: var(--bg-secondary);
}

.portal-btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.portal-btn-primary:hover {
  opacity: 0.85;
}

.portal-btn-danger {
  background: var(--bg-primary);
  color: #b91c1c;
  border-color: #b91c1c;
}

.portal-btn-danger:hover {
  background: #fef2f2;
}

.portal-btn-sm {
  padding: 0.3rem 0.7rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.portal-btn-sm:hover {
  background: var(--bg-secondary);
}

.portal-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.portal-status.success {
  color: #15803d;
}

.portal-status.error {
  color: #b91c1c;
}

/* Submissions List */
.submissions-list {
  list-style: none;
  padding: 0;
}

.submission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.submission-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.submission-title-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  color: var(--text-primary);
}

.submission-status {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-draft {
  color: var(--text-muted);
  border-color: var(--border-color);
}

.status-submitted {
  color: #2563eb;
  border-color: #93c5fd;
}

.status-approved {
  color: #15803d;
  border-color: #86efac;
}

.status-rejected {
  color: #b91c1c;
  border-color: #fca5a5;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1rem 0;
}

.drafts-section h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Review Page */
.review-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-header h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.review-preview {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 150px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.review-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-primary));
}

.review-actions {
  display: flex;
  gap: 0.5rem;
}

/* EasyMDE overrides to match site aesthetic */
.EasyMDEContainer .CodeMirror {
  border: 1px solid var(--border-color);
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  color: var(--text-primary);
}

.EasyMDEContainer .editor-toolbar {
  border: 1px solid var(--border-color);
  border-bottom: none;
}

.EasyMDEContainer .editor-toolbar button {
  color: var(--text-secondary) !important;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

/* Dashboard — User Bar */
.dash-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  margin-bottom: 1.5rem;
}

.dash-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.dash-email {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.dash-role {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.dash-role[data-role="admin"] { color: #2e7d32; }
.dash-role[data-role="contributor"] { color: #1565c0; }

.dash-signout-btn {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dash-signout-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Dashboard — Cards */
.dash-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.dash-card-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0;
}

.dash-card-action {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.dash-card-action:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.dash-card-body {
  padding: 1.25rem;
}

.dash-section-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

/* Dashboard — Tables */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dash-table th {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.dash-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 50%, transparent);
  vertical-align: middle;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-table-title {
  font-weight: 500;
  color: var(--text-primary);
}

.dash-table-date {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.dash-table-actions {
  text-align: right;
  white-space: nowrap;
}

.dash-status {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.dash-status.status-draft { background: #f5f5f5; color: #666; }
.dash-status.status-submitted { background: #fff3e0; color: #e65100; }
.dash-status.status-approved { background: #e8f5e9; color: #2e7d32; }
.dash-status.status-published { background: #e3f2fd; color: #1565c0; }
.dash-status.status-rejected { background: #fce4ec; color: #c62828; }

.dash-table-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-left: 0.25rem;
}

.dash-table-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.dash-table-btn-approve {
  color: #2e7d32;
  border-color: #c8e6c9;
}
.dash-table-btn-approve:hover {
  background: #e8f5e9;
  border-color: #2e7d32;
}

.dash-table-btn-reject {
  color: #c62828;
  border-color: #ffcdd2;
}
.dash-table-btn-reject:hover {
  background: #fce4ec;
  border-color: #c62828;
}

.portal-back {
  margin-bottom: 1.5rem;
}

.portal-back a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.portal-back a:hover {
  color: var(--text-primary);
}

/* Portal Preview Panel */
.portal-preview {
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.portal-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.portal-preview-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.portal-preview-body {
  max-width: 700px;
}

/* Portal Subdomain Header */
.portal-site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.portal-site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.15rem;
}

.portal-site-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0;
}

#portal-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: right;
}

/* Editor form fields */
.editor-field {
  margin-bottom: 1.25rem;
}

.editor-label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.editor-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.editor-input:focus {
  outline: none;
  border-color: var(--text-secondary);
}

.editor-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* WYSIWYG toolbar */
.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0.35rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.wysiwyg-btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.85rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.wysiwyg-btn:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.wysiwyg-sep {
  width: 1px;
  height: 18px;
  background: var(--border-color);
  margin: 0 0.3rem;
}

/* WYSIWYG editor area */
.wysiwyg-editor {
  min-height: 350px;
  padding: 1rem 1.25rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  background: var(--bg-primary);
  outline: none;
  overflow-y: auto;
}

.wysiwyg-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-style: italic;
}

.wysiwyg-editor:focus {
  border-color: var(--text-secondary);
}

.wysiwyg-editor h2 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
}

.wysiwyg-editor blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1rem;
  color: var(--text-secondary);
  margin: 1rem 0;
}
