/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Material Design styles are loaded separately via stylesheet_link_tag in layout */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Editorial loading bubbles - dots sequentially pulse big then small */
@keyframes editorial-bubble-slide {
  0%, 100% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
}

.editorial-bubbles {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  color: #1a1c1e;
}

.dark .editorial-bubbles {
  color: var(--md-on-surface);
}

.editorial-bubbles__dot {
  display: inline-block !important;
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  animation: editorial-bubble-slide 1.2s ease-in-out infinite;
}

.editorial-bubbles__dot:nth-child(2) { animation-delay: 0.2s; }
.editorial-bubbles__dot:nth-child(3) { animation-delay: 0.4s; }

.editorial-bubbles--sm .editorial-bubbles__dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
}

.editorial-bubbles--lg .editorial-bubbles__dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
}

.editorial-bubbles--xl .editorial-bubbles__dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
}

/* SVG bubble animation - used by editorial-bubbles-svg */
.editorial-bubbles-svg .bubble-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: editorial-bubble-slide 0.6s ease-in-out infinite;
}

.editorial-bubbles-svg .bubble-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.editorial-bubbles-svg .bubble-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Markdown prose styles - scoped to .prose class */
.prose {
  color: var(--md-on-surface);
  max-width: 65ch;
  line-height: 1.75;
}

.prose-sm {
  font-size: 0.875rem;
  line-height: 1.7142857;
}

/* Use Material Design colors for markdown */
.prose,
.prose-sm {
  color: var(--md-on-surface);
}

/* Paragraphs - normal text size, not headings */
.prose-sm p {
  margin-top: 1.1428571em;
  margin-bottom: 1.1428571em;
  color: var(--md-on-surface);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.7142857;
  display: block;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: var(--md-on-surface);
}

.prose-sm p:first-child {
  margin-top: 5px;
}

.prose-sm p:last-child {
  margin-bottom: 5px;
}

/* Ensure paragraphs are separated with clear line breaks */
.prose-sm p + p {
  margin-top: 1.1428571em;
}

/* Ensure paragraphs after headings have proper spacing */
.prose-sm h1 + p,
.prose-sm h2 + p,
.prose-sm h3 + p,
.prose-sm h4 + p {
  margin-top: 0.8em;
}

/* Headings - only actual headings get heading styles */
.prose-sm h1,
.prose h1 {
  font-size: 1.7142857em;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  font-weight: 700;
  color: var(--md-on-surface);
  border-bottom: 2px solid var(--md-outline-variant);
  padding-bottom: 0.3em;
}

.prose-sm h1:first-child,
.prose h1:first-child {
  margin-top: 0;
}

.prose-sm h2:first-child,
.prose h2:first-child,
.prose-sm h3:first-child,
.prose h3:first-child,
.prose-sm h4:first-child,
.prose h4:first-child {
  margin-top: 0;
}

.prose-sm h2,
.prose h2 {
  font-size: 1.4285714em;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
  font-weight: 600;
  color: var(--md-on-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  padding-bottom: 0.2em;
}

.prose-sm h3,
.prose h3 {
  font-size: 1.1428571em;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  line-height: 1.5;
  font-weight: 600;
  color: var(--md-on-surface);
}

.prose-sm h4,
.prose h4 {
  font-size: 1em;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  line-height: 1.6;
  font-weight: 600;
  color: var(--md-on-surface);
}

/* Ensure paragraphs don't inherit heading styles - override any inheritance */
.prose-sm p {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.7142857 !important;
  color: var(--md-on-surface) !important;
}

/* Lists */
.prose-sm ul,
.prose-sm ol {
  margin-top: 1.1428571em;
  margin-bottom: 1.1428571em;
  padding-left: 1.5714286em;
  color: var(--md-on-surface);
  font-size: 0.875rem;
  list-style-position: outside;
  display: block;
}

.prose-sm ul {
  list-style-type: disc;
  list-style-position: outside;
}

.prose-sm ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.prose-sm li {
  margin-top: 0.2857143em;
  margin-bottom: 0.2857143em;
  font-size: 0.875rem;
  display: list-item;
  list-style-position: outside;
  padding-left: 0.5em;
}

.prose-sm li > p {
  margin-top: 0.5714286em;
  margin-bottom: 0.5714286em;
}

.prose-sm li > :first-child {
  margin-top: 0;
}

.prose-sm li > :last-child {
  margin-bottom: 0;
}

/* Ensure list items have visible bullets */
.prose-sm ul li::marker,
.prose ul li::marker {
  color: var(--md-on-surface-variant);
  font-weight: normal;
}

.prose-sm ol li::marker,
.prose ol li::marker {
  color: var(--md-on-surface-variant);
  font-weight: normal;
}

/* Lists - full size */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
  color: var(--md-on-surface);
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
}

/* Links - moved below with !important to ensure they override parent colors */

/* Strong and emphasis */
.prose-sm strong,
.prose strong {
  font-weight: 600;
  color: var(--md-on-surface);
}

.prose-sm em,
.prose em {
  font-style: italic;
  color: var(--md-on-surface);
}

/* Code */
.prose-sm code,
.prose code {
  font-size: 0.8571429em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background-color: var(--md-surface-variant);
  padding: 0.1428571em 0.2857143em;
  border-radius: 0.25rem;
  color: var(--md-on-surface);
  font-weight: 500;
}

.prose-sm pre,
.prose pre {
  font-size: 0.8571429em;
  line-height: 1.6666667;
  margin-top: 1.6666667em;
  margin-bottom: 1.6666667em;
  border-radius: 0.5rem;
  padding: 1em;
  background-color: var(--md-surface-variant);
  overflow-x: auto;
  color: var(--md-on-surface);
  border: 1px solid var(--md-outline-variant);
}

/* Dark mode code block adjustments */
.dark .prose-sm code,
.dark .prose code {
  background-color: var(--md-surface-container);
}

.dark .prose-sm pre,
.dark .prose pre {
  background-color: var(--md-surface-container);
  border-color: var(--md-outline);
}

.dark .prose-lg code {
  background-color: var(--md-surface-container);
}

.dark .prose-lg pre {
  background-color: var(--md-surface-container);
  border-color: var(--md-outline);
}

.prose-sm pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Blockquotes */
.prose-sm blockquote,
.prose blockquote {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding: 1em 1.5em;
  padding-left: 1.5em;
  border-left: 0.25em solid var(--md-primary);
  background-color: var(--md-surface-container);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: normal;
  color: var(--md-on-surface-variant);
  font-size: 0.875rem;
}

.prose blockquote {
  font-size: 1rem;
}

/* Horizontal rules */
.prose-sm hr,
.prose hr {
  margin-top: 2.8571429em;
  margin-bottom: 2.8571429em;
  border-top: 1px solid var(--md-outline-variant);
  border-bottom: none;
  border-left: none;
  border-right: none;
}

/* Tables */
.prose-sm table,
.prose table {
  width: 100%;
  margin-top: 1.1428571em;
  margin-bottom: 1.1428571em;
  border-collapse: collapse;
  font-size: 0.8571429em;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--md-outline-variant);
}

.prose-sm th,
.prose-sm td,
.prose th,
.prose td {
  padding: 0.75em 1em;
  border: 1px solid var(--md-outline-variant);
  text-align: left;
}

.prose-sm th,
.prose th {
  font-weight: 600;
  background-color: var(--md-surface-container);
  color: var(--md-on-surface);
}

.prose-sm td,
.prose td {
  color: var(--md-on-surface);
  background-color: var(--md-surface);
}

.prose-sm tr:hover td,
.prose tr:hover td {
  background-color: var(--md-surface-variant);
}

/* Dark mode table adjustments */
.dark .prose-sm th,
.dark .prose th {
  background-color: var(--md-surface-container);
}

.dark .prose-sm tr:hover td,
.dark .prose tr:hover td {
  background-color: var(--md-surface-container);
  opacity: 0.8;
}

/* Images */
.prose-sm img {
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  max-width: 100%;
  height: auto;
}

/* Remove max-width constraint when max-w-none is applied */
.prose.max-w-none {
  max-width: none;
}

/* Prose-lg styles - larger version of prose-sm */
.prose-lg {
  font-size: 1.125rem;
  line-height: 1.7777778;
}

.prose-lg p {
  margin-top: 1.3333333em;
  margin-bottom: 1.3333333em;
  color: var(--md-on-surface);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7777778;
}

.prose-lg p:first-child {
  margin-top: 0;
}

.prose-lg p:last-child {
  margin-bottom: 0;
}

.prose-lg h1 {
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
  font-weight: 800;
  color: var(--md-on-surface);
}

.prose-lg h2 {
  font-size: 1.875em;
  margin-top: 1.6em;
  margin-bottom: 0.8888889em;
  line-height: 1.3333333;
  font-weight: 700;
  color: var(--md-on-surface);
}

.prose-lg h3 {
  font-size: 1.5em;
  margin-top: 1.6em;
  margin-bottom: 0.6666667em;
  line-height: 1.6;
  font-weight: 600;
  color: var(--md-on-surface);
}

.prose-lg h4 {
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6666667em;
  line-height: 1.6;
  font-weight: 600;
  color: var(--md-on-surface);
}

.prose-lg ul,
.prose-lg ol {
  margin-top: 1.3333333em;
  margin-bottom: 1.3333333em;
  padding-left: 1.5555556em;
  color: var(--md-on-surface);
  font-size: 1.125rem;
}

.prose-lg ul {
  list-style-type: disc;
}

.prose-lg ol {
  list-style-type: decimal;
}

.prose-lg li {
  margin-top: 0.6666667em;
  margin-bottom: 0.6666667em;
  font-size: 1.125rem;
}

/* Links - Material Design primary color */
.prose-lg a,
.prose a {
  color: var(--md-primary) !important;
  text-decoration: underline;
  text-decoration-color: var(--md-primary);
  text-underline-offset: 2px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.prose-lg a {
  font-size: 1.125rem;
}

.prose a {
  font-size: 1rem;
}

.prose-lg a:hover,
.prose a:hover {
  opacity: 0.8;
  text-decoration-thickness: 2px;
}

/* Also ensure prose-sm links override parent colors */
.prose-sm a {
  color: var(--md-primary) !important;
  text-decoration: underline;
  text-decoration-color: var(--md-primary);
  text-underline-offset: 2px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.2s ease;
}

.prose-sm a:hover {
  opacity: 0.8;
  text-decoration-thickness: 2px;
}

.prose-lg strong {
  font-weight: 600;
  color: var(--md-on-surface);
}

.prose-lg em {
  font-style: italic;
}

.prose-lg code {
  font-size: 0.8888889em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background-color: var(--md-surface-variant);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  color: var(--md-on-surface);
}

.prose-lg pre {
  font-size: 0.8888889em;
  line-height: 1.75;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.375rem;
  padding: 1em 1.5em;
  background-color: var(--md-surface-variant);
  overflow-x: auto;
  color: var(--md-on-surface);
  border: 1px solid var(--md-outline-variant);
}

.prose-lg pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.prose-lg blockquote {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1em;
  border-left: 0.25em solid var(--md-primary);
  background-color: var(--md-surface-container);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: normal;
  color: var(--md-on-surface-variant);
  font-size: 1.125rem;
  padding: 1em 1.5em;
}

.prose-lg hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border-top: 1px solid var(--md-outline-variant);
  border-bottom: none;
  border-left: none;
  border-right: none;
}

.prose-lg table {
  width: 100%;
  margin-top: 1.3333333em;
  margin-bottom: 1.3333333em;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose-lg th,
.prose-lg td {
  padding: 0.6666667em;
  border: 1px solid var(--md-outline-variant);
}

.prose-lg th {
  font-weight: 600;
  background-color: var(--md-surface-container);
  color: var(--md-on-surface);
}

.prose-lg td {
  color: var(--md-on-surface);
  background-color: var(--md-surface);
}

.prose-lg img {
  margin-top: 2em;
  margin-bottom: 2em;
  max-width: 100%;
  height: auto;
}

/* Citation Tooltip */
.citation-tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted currentColor;
  opacity: 0.8;
  cursor: help;
  transition: opacity 0.2s ease-in-out;
}

.citation-tooltip:hover {
  opacity: 1;
  border-bottom-style: solid;
}

/* Wrapper for one or more [N] citation markers (may mix links + tooltip spans) */
.citation-reference-group {
  display: inline;
  white-space: normal;
}

/* Citation Reference Link (for inline citations in research reports) */
.citation-reference-link {
  position: relative;
  display: inline-block;
  transition: opacity 0.2s ease-in-out;
}

.citation-reference-link:hover {
  opacity: 1;
  border-bottom-style: solid !important;
}

.citation-reference-link::before,
.citation-reference-link::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  visibility: hidden;
  z-index: 1000;
}

.citation-reference-link::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-width: 500px;
  min-width: 200px;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.citation-reference-link::after {
  content: "";
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.95);
}

.citation-reference-link:hover::before,
.citation-reference-link:hover::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .citation-reference-link::before {
    max-width: calc(100vw - 40px);
    left: 0;
    transform: none;
  }
  
  .citation-reference-link::after {
    left: 20px;
    transform: none;
  }
}

.citation-tooltip::before,
.citation-tooltip::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  visibility: hidden;
  z-index: 1000;
}

.citation-tooltip::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-width: 500px;
  min-width: 200px;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.citation-tooltip::after {
  content: "";
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.95);
}

.citation-tooltip:hover::before,
.citation-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Adjust tooltip position on smaller screens */
@media (max-width: 640px) {
  .citation-tooltip::before {
    max-width: calc(100vw - 40px);
    left: 0;
    transform: none;
  }
  
  .citation-tooltip::after {
    left: 20px;
    transform: none;
  }
}

/* Threaded comment reply - details/summary styling */
.reply-details summary {
  list-style: none;
}

.reply-details summary::-webkit-details-marker {
  display: none;
}

/* Reply link inline with Like/Trash; form on its own line when open */
.reply-form-own-line[open] {
  flex-basis: 100%;
  margin-top: 0.5rem;
}

/* Reply form breaks out of nested comment indent - aligns with main column */
.reply-form-breakout {
  margin-left: -1rem;
}

@media (min-width: 640px) {
  .reply-form-breakout {
    margin-left: -2.5rem;
  }
}

/* Reply textarea - standalone, not nested in md-text-field */
.reply-textarea {
  display: block;
  width: 100%;
  min-height: 6rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--md-on-surface);
  background-color: transparent;
  border: 2px solid var(--md-outline);
  border-radius: 0.25rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.reply-textarea::placeholder {
  color: var(--md-on-surface-variant);
  opacity: 0.6;
}

.reply-textarea:focus {
  border-color: var(--md-primary);
}

/* Discussion card component — matches up_next_prototype */
.discussion-card {
  background: var(--md-surface, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.discussion-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-on-surface, #1a1a1a);
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--md-outline-variant, #eee);
}

.discussion-card__entries {
  padding: 0;
}

/* Comment item — author, body, meta layout */
.comment-item {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--md-outline-variant, #eee);
}

@media (min-width: 768px) {
  .comment-item {
    padding: 1.25rem 1.5rem;
  }
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-item--readonly {
  background: color-mix(in srgb, var(--md-surface-variant, #f3f3f3) 65%, transparent);
}

.comment-item__readonly-badge {
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-on-surface-variant, #777);
  margin-bottom: 0.5rem;
}

.comment-item__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

@media (min-width: 768px) {
  .comment-item__content {
    gap: 0.25rem;
  }
}

.comment-item__header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.5rem;
}

.comment-item__author {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.25rem;
  row-gap: 0.15rem;
  font-size: 0.813rem;
  line-height: 1.35;
}

.comment-item__author-name {
  font-weight: 500;
  color: var(--md-on-surface, #1a1a1a);
  flex-shrink: 0;
}

.comment-item__author-meta {
  font-weight: 400;
  color: var(--md-on-surface-variant, #666);
  letter-spacing: 0.02em;
}

.comment-item__author-meta-sep {
  color: var(--md-on-surface-variant, #666);
  user-select: none;
}

.comment-item__body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--md-on-surface, #1a1a1a);
  margin: 1rem 0 0;
  white-space: pre-wrap;
}

@media (min-width: 768px) {
  .comment-item__body {
    margin-top: 1.25rem;
  }
}

.comment-item__meta {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.35rem;
  row-gap: 0.15rem;
  margin: 0;
}

.comment-item__meta-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35rem;
  row-gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}

.comment-item__meta-text {
  white-space: nowrap;
}

.comment-item__meta-sep {
  user-select: none;
}

.comment-item__meta details summary {
  cursor: pointer;
  list-style: none;
  color: var(--md-primary, #6366f1);
  font-size: inherit;
  font-weight: 400;
}

.comment-item__meta details[open] summary {
  margin-bottom: 0.5rem;
}

.comment-item__actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
  margin-left: auto;
}

.comment-item__action {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: inherit;
}

.comment-item__action:hover {
  color: #1a1a1a;
}

.comment-item__action--liked {
  color: var(--md-primary, #6366f1);
}

/* button_to renders a form; ensure it displays inline */
.comment-item__action form {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.comment-item__actions form button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: inherit;
}

.comment-item__empty {
  padding: 0.625rem 0.75rem;
  font-size: 0.813rem;
  color: var(--md-on-surface-variant, #6b7280);
  margin: 0;
}

@media (min-width: 768px) {
  .comment-item__empty {
    padding: 1.25rem 1.5rem;
  }
}

/* Comment form inside Discussion card */
.discussion-card .comment-form.deep-dive-article__comment-form {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--md-outline-variant, #eee);
}

@media (min-width: 768px) {
  .discussion-card .comment-form.deep-dive-article__comment-form {
    padding: 1.25rem 1.5rem;
  }
}

.discussion-card .comment-form .comment-form__body {
  margin-bottom: 0.5rem;
}

.discussion-card .comment-form.deep-dive-article__comment-form textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--md-on-surface, #1a1a1a);
  background: transparent;
  border: 1px solid var(--md-outline-variant, #e5e7eb);
  border-radius: 6px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.discussion-card .comment-form.deep-dive-article__comment-form textarea:focus {
  border-color: var(--md-primary);
}

.discussion-card .comment-form.deep-dive-article__comment-form [type="submit"] {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background: var(--md-primary);
  color: var(--md-on-primary);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.discussion-card .comment-form.deep-dive-article__comment-form [type="submit"]:hover {
  opacity: 0.9;
}

/* ============================================
   EDITORIAL NAV (01 minimal) — in application.css so it always loads
   See docs/mockups/nav_editorial_01_minimal.html
   ============================================ */
nav.editorial-nav.editorial-nav-desktop {
  display: none;
}
@media (min-width: 640px) {
  nav.editorial-nav.editorial-nav-desktop {
    display: block;
  }
}

nav.editorial-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 2px solid #1a1c1e;
  padding: 0.75rem 1.5rem;
  box-shadow: none;
}

.dark nav.editorial-nav {
  background: var(--md-surface);
  border-bottom-color: var(--md-outline);
}

.editorial-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.editorial-nav-brand {
  flex-shrink: 0;
}

.editorial-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #1a1c1e;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dark .editorial-nav-logo {
  color: var(--md-on-surface);
}

.editorial-nav-logo-img {
  width: 2rem;
  height: 2rem;
  max-width: 2rem;
  max-height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.editorial-nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.editorial-nav-link {
  padding: 0.5rem 1rem;
  color: #1a1c1e !important;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border-radius: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.editorial-nav-link:hover {
  background: #f9fafb;
}

.editorial-nav-link:visited,
button.editorial-nav-link {
  color: #1a1c1e !important;
}

.dark .editorial-nav-link {
  color: var(--md-on-surface) !important;
}

.dark .editorial-nav-link:hover {
  background: var(--md-surface-container-high);
}

.editorial-nav-link.active {
  font-weight: 600;
}

.editorial-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.editorial-nav-action {
  padding: 0.5rem 1rem;
  color: #1a1c1e !important;
  text-decoration: none;
  font-size: 0.9375rem;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: none;
  border: none;
  cursor: pointer;
}

.editorial-nav-action:visited {
  color: #1a1c1e !important;
}

.editorial-nav-action:hover {
  background: #f9fafb;
}

.dark .editorial-nav-action {
  color: var(--md-on-surface) !important;
}

.dark .editorial-nav-action:hover {
  background: var(--md-surface-container-high);
}

.editorial-nav-logout,
.editorial-nav-login {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.editorial-nav-signup {
  padding: 0.5rem 1rem;
  background: #1a1c1e;
  color: #fff;
  border: 2px solid #1a1c1e;
  font-weight: 500;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

.editorial-nav-signup:hover {
  opacity: 0.9;
}

.dark .editorial-nav-signup {
  background: var(--md-on-surface);
  color: var(--md-surface);
  border-color: var(--md-on-surface);
}

nav.editorial-nav [data-dropdown-target="menu"],
nav.editorial-nav .editorial-dropdown-menu {
  background: #fff !important;
  border: 2px solid #1a1c1e !important;
  border-radius: 0.5rem !important;
  box-shadow: none !important;
}

nav.editorial-nav [data-dropdown-target="menu"] a,
nav.editorial-nav .editorial-dropdown-menu a {
  color: #1a1c1e !important;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  text-decoration: none !important;
}

