:root {
  /* Neutrals */
  --color-black: 0 0% 0%;
  --color-dark: 0 0% 8%;
  --color-white: 0 0% 100%;

  /* Brand — Orange (Fixed for contrast) */
  --color-orange-100: 24 100% 42%; /* #D65500 - Darkened for 4.5:1 contrast on light backgrounds */
  --color-orange-500: 24 100% 35%; /* #B34700 - Darkened for 4.5:1 contrast */
  --color-orange-700: 24 100% 30%; /* #993D00 */

  /* Supportive - Green */
  --color-green-500: 141 53% 53%; /* #34A853 */
  --color-green-700: 141 63% 43%; /* #0F9D58 */

  /* Supportive - Blue */
  --color-blue-500: 219 100% 47%; /* #1976D2 */
  --color-blue-700: 219 100% 41%; /* #1565C0 */

  /* Supportive - Yellow */
  --color-yellow-500: 45 100% 51%; /* #FBC02D */
  --color-yellow-700: 45 100% 41%; /* #F9A825 */

  /* Typography */
  --font-sans:
    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --default-font-size: 16px;
  --font-size-scale: 1.25;

  /* Transitions */
  --transition-fast: all 300ms ease-in-out;
  --transition-slow: all 500ms ease-in-out;
}

:root {
  /* Backgrounds */
  --background-primary: hsl(var(--color-white));
  --background-secondary: hsl(0 0% 97%);
  --background-surface: hsl(var(--color-orange-100));

  /* Text */
  --text-primary: hsl(var(--color-dark));
  --text-secondary: hsl(0 0% 20%);
  --text-inverse: hsl(var(--color-white));

  /* Accent */
  --accent-primary: hsl(var(--color-black));
  --accent-hover: hsl(var(--color-orange-700));
  --accent-muted: hsl(var(--color-black));

  /* Supportive */
  --supportive-green: hsl(var(--color-green-500));
  --supportive-blue: hsl(var(--color-blue-500));
  --supportive-yellow: hsl(var(--color-yellow-500));

  /* Border */
  --border-primary: hsl(0 0% 88%);
  --border-accent: hsl(var(--color-black));

  /* Shadows */
  --shadow-light: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 0.375rem 0.5rem rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 1rem 2rem rgba(0, 0, 0, 0.2);

  /* Form */
  --form-placeholder: hsl(0 0% 60%);
}

[data-theme="dark"] {
  /* Background */
  --background-primary: hsl(var(--color-black));
  --background-secondary: hsl(var(--color-dark));
  --background-surface: hsl(0 0% 12%);

  /* Text */
  --text-primary: hsl(var(--color-white));
  --text-secondary: hsl(0 0% 80%);
  --text-inverse: hsl(var(--color-black));

  /* Accent */
  --accent-primary: hsl(var(--color-black));
  --accent-hover: hsl(var(--color-orange-100));
  --accent-muted: hsl(var(--color-black));

  /* Border */
  --border-primary: hsl(0 0% 16%);
  --border-accent: hsl(var(--color-orange-700));

  /* Shadows */
  --shadow-light: 0 0.125rem 0.375rem rgba(255, 255, 255, 0.1);
  --shadow-medium: 0 0.375rem 0.5rem rgba(255, 255, 255, 0.1);
  --shadow-heavy: 0 1rem 2rem rgba(255, 255, 255, 0.2);

  /* Form */
  --form-placeholder: hsl(0 0% 40%);
}

html {
  font-size: calc(var(--default-font-size) * var(--font-size-scale));
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  background-color: var(--background-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* .hnd class is applied to body, so these styles are effectively global */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p:not(:last-child) {
  margin-bottom: 1rem;
}

time {
  color: #595959;
}

.dept-text {
  color: #595959 !important;
}

.article-digg label,
.article-digg {
  color: #595959 !important;
}

  svg {
    display: block;
    width: 1.25rem;
    height: 1.15rem;
    flex-shrink: 0;
  }

  .container {
    /*
    max-width: 1224px;
    margin-inline: auto;
    padding-inline: 0.625rem;
    */
  }

  .divider {
    width: 100%;
    height: 0.125rem;
    border: none;
    background-color: var(--border-primary);
    margin-block: 1.5rem;
    color: var(--border-accent);
  }

  .overflow-auto {
    overflow: auto;
  }

  .underlined {
    text-decoration: underline;
  }

  /* ==========================================================
  List
  ========================================================== */
  .list-bullet {
    list-style: disc;
    padding-left: 1rem;
  }

  .list-number {
    list-style: decimal;
    padding-left: 1rem;
  }

  .list {
    padding-left: 1rem;
  }

  /* ==========================================================
  Badges
  ========================================================== */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border-accent);
    background-color: var(--background-surface);
    color: var(--text-inverse);
    padding: 0.125rem 0.375rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 500;
  }

  /* ==========================================================
  Table
  ========================================================== */
  .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }

  .table-bordered tr {
    border-bottom: 1px solid var(--border-primary);
  }

  .table-bordered tr:first-child {
    border-top: 1px solid var(--border-primary);
  }

  .table-bordered th,
  .table-bordered td {
    border-right: 1px solid var(--border-primary);
  }

  .table-bordered th:first-child,
  .table-bordered td:first-child {
    border-left: 1px solid var(--border-primary);
  }

  /* ==========================================================
  Form Elements
  ========================================================== */

  /* Base Form Label */
  .form-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
  }

  .form-label-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .form-label-group .form-label {
    margin-bottom: 0;
  }

  /* Additional Form Info Text */
  .form-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }

  /* Base Form Control (input, textarea, select) */
  .form-control {
    width: 100%;
    padding: 0.5rem 0.625rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--background-primary);
    border: 1px solid var(--border-primary);
    transition: var(--transition-fast);
    box-sizing: border-box;
  }

  .form-control::placeholder {
    color: var(--form-placeholder);
    opacity: 1;
  }

  .form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.125rem var(--accent-muted);
  }

  .form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 2rem;
  }

  .form-fieldset {
    border: 1px solid var(--border-primary);
    padding: 0 1rem 0.5rem;
    margin-bottom: 1rem;
  }

  .form-fieldset .form-group:last-child {
    margin-bottom: 0;
  }

  .form-legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .valid-feedback {
    color: var(--supportive-green);
    font-size: 0.875rem;
    margin-top: 0.375rem;
  }

  .invalid-feedback {
    color: var(--accent-primary);
    font-size: 0.875rem;
    margin-top: 0.375rem;
  }

  /* Textarea Specific */
  textarea.form-control {
    min-height: 5rem;
    resize: vertical;
  }

  /* Select Specific */
  select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath fill='%23000' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.5rem auto;
    padding-right: 1.5rem;
  }

  /* Checkbox & Radio */
  .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
  }

  .form-check input[type="checkbox"],
  .form-check input[type="radio"],
  input[type="checkbox"],
  input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
    flex-shrink: 0;
  }

  .form-check-label {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
  }

  /* Form Group */
  .form-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
  }

  /* Error / Help Text */
  .form-help {
    color: var(--text-secondary);
    margin-top: 0.375rem;
  }

  /* ==========================================================
  Buttons
  ========================================================== */
  /* Button */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    font-weight: 500;
    color: var(--text-inverse);
    background-color: var(--accent-primary);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    text-decoration: none;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

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

  .btn:disabled {
    background-color: var(--accent-muted);
    cursor: not-allowed;
    opacity: 0.7;
  }

  .btn-group {
    display: flex;
  }

  /* ==========================================================
  Card
  ========================================================== */
  .card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-primary);
    overflow: hidden;
  }

  .card-body {
    padding: 1rem;
  }

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

  .card-header .card-title {
    margin-bottom: 0;
  }

  .card-title {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .card-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-primary);
  }

  /* ==========================================================
  Links
  ========================================================== */
  .link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
  }

  .link:hover,
  .link.active {
    color: var(--accent-hover);
    text-decoration: underline;
  }

  /* ==========================================================
  Modal
========================================================== */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: hsl(var(--color-black) / 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1110;

    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
  }

  .modal-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  .modal {
    position: relative;
    background-color: var(--background-primary);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-light);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;

    transform: scale(0.95);
    opacity: 0;
    transition: var(--transition-fast);
  }

  .modal-backdrop.active .modal {
    transform: scale(1);
    opacity: 1;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .modal-header {
    border-bottom: 1px solid var(--border-primary);
  }

  .modal-footer {
    border-top: 1px solid var(--border-primary);
    text-align: right;
  }

  .modal-title {
    font-size: 1rem;
    margin: 0;
  }

  .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: hsl(var(--color-dark)) !important;
  }

  /* ==========================================================
  Section
  ========================================================== */
  .section .container {
    /* padding-block: 1.5rem; */
  }

  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .section-header .section-title {
    margin-bottom: 0;
  }

  .section-title {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }

  .section-title.alt {
    border: 1px solid var(--border-accent);
    padding: 0.25rem 1rem;
    border-radius: 50rem;
    font-size: 1rem;
    font-weight: 500;
  }

  .section-title.alt a {
    text-decoration: underline;
  }

  .section-title a {
    color: var(--accent-primary);
    transition: var(--transition-fast);
  }

  .section-title.lg {
    font-size: 1.5rem;
  }

  .section-description {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  /* ==========================================================
  Header
  ========================================================== */
  .header-main {
    background-color: var(--background-surface);
    position: sticky;
    top: 0;
    z-index: 1111;
  }

  .header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.5rem;
  }

  .skip-link {
    display: none;
  }

  @media only screen and (min-width: 640px) {
    .header-main .container {
      width: 100%;
      max-width: 1224px;
      gap: 1rem;
    }
  }

  /* ==========================================================
  Brand
  ========================================================== */
  .brand-logo {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    width: min-content;
  }

  .brand-logo .text-accent {
    display: inline-block;
    color: var(--text-inverse);
    background-color: var(--accent-primary);
    padding: 0.125rem 0.375rem;
  }

  @media only screen and (min-width: 1024px) {
    .brand-logo {
      font-size: 1rem;
    }
  }

  /* ==========================================================
  Navigation
  ========================================================== */
  .hamburger-btn {
    flex-shrink: 0;
    padding: 0.375rem 0.5rem;
  }

  @media only screen and (min-width: 1024px) {
    .hamburger-btn {
      display: none;
    }
  }

  .header-main .nav {
    flex: 1;
    display: flex;
    justify-content: space-between;
  }

  .nav ul {
    display: flex;
    gap: 0.5rem;
  }

  .nav a {
    display: inline-flex;
    color: var(--text-primary);
    padding-inline: 0.125rem;
    transition: var(--transition-fast);
  }

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

  /* Active state (optional) */
  .nav a[aria-current="page"],
  .nav a.active {
    font-weight: 500;
    color: var(--accent-hover);
  }

  .header-main .nav-left {
    position: fixed;
    inset: 3rem 0 0;
    background-color: var(--background-surface);
    padding: 1rem;
    transform: translateX(-100%);
    transition: var(--transition-fast);
    z-index: 100;
    opacity: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
    gap: 0.5rem 1rem;
  }

  .header-main .nav-left ul {
    flex-direction: column;
  }

  .header-main .nav.open .nav-left {
    transform: translateX(0);
    opacity: 1;
  }

  .header-main .nav-right {
    margin-left: auto;
    flex-shrink: 0;
    align-items: center;
  }

  .nav-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .header-main .footer-main .nav ul {
    flex-direction: row;
  }

  @media only screen and (min-width: 1024px) {
    .header-main .nav-left,
    .header-main .nav.open .nav-left {
      position: static;
      transform: translateX(0);
      opacity: 1;
      background: none;
      padding: 0;
      flex-direction: row;
      align-items: center;
      overflow: visible;
      max-height: 100%;
      flex-wrap: wrap;
    }

    .header-main .nav-left ul,
    .header-main .nav.open .nav-left ul {
      flex-direction: row;
      align-items: center;
      flex-wrap: wrap;
    }

    .header-main .footer-main {
      display: none;
    }

    .nav-title {
      display: none;
    }
  }

  /* =========================================================
  Theme Toggle
  ========================================================== */
  .dark-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
    vertical-align: middle;
    line-height: 1;
  }

  .dark-mode-btn .icon-sun {
    display: none;
    transition: var(--transition-fast);
  }

  .dark-mode-btn .icon-moon {
    display: inline-block;
    transition: var(--transition-fast);
  }

  .dark-mode-btn .icon-sun,
  .dark-mode-btn .icon-moon {
    opacity: 1;
  }

  /* Light mode settings dock visibility */
  [data-theme="light"] .settings-dock,
  :root:not([data-theme]) .settings-dock {
    background-color: hsl(var(--color-orange-500) / 0.85) !important;
    border-color: hsl(var(--color-orange-700)) !important;
    color: var(--text-inverse) !important;
  }

  [data-theme="light"] .settings-btn,
  :root:not([data-theme]) .settings-btn {
    background-color: hsl(var(--color-white) / 0.15);
    color: var(--text-inverse);
  }

  [data-theme="light"] .settings-btn:hover,
  :root:not([data-theme]) .settings-btn:hover {
    background-color: hsl(var(--color-white) / 0.25);
  }

  /* ==========================================================
  Footer
  ========================================================== */
  .footer-main .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0rem;
    padding-block: 1.25rem;
  }

  .footer-main .nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-top {
    border-top: 1px solid var(--border-accent);
  }

  .footer-bottom {
    border-top: 1px solid var(--border-accent);
    display: flex;
    justify-content: flex-end;
    text-align: center;
  }

  .footer-bottom .container {
    padding-bottom: 0;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-logo svg {
    width: 7rem;
    height: auto;
  }

  .footer-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.25rem 1rem;
    margin-top: -2.1rem;
  }

  /* ==========================================================
  Tooltip
  ========================================================== */
  .tooltip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
    z-index: 9999999999;
  }

  .tooltip .icon {
    cursor: pointer;
    font-size: 0.875rem;
  }

  .tooltip .content {
    position: absolute;
    bottom: 100%;
    right: 100%;
    background-color: var(--background-surface);
    border: 1px solid var(--border-accent);
    padding: 0.5rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    width: 15rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    box-shadow: var(--shadow-light);
  }

  .tooltip:hover .content {
    opacity: 1;
    visibility: visible;
  }

  /* ==========================================================
  Search Box
  ========================================================== */
  .search-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
  }

  .search-box .form-label {
    margin-bottom: 0;
  }

  .search-box .form-control {
    max-width: 15rem;
    width: 100%;
  }
  
  .search-box .btn {
    width: auto;
  }
  
  .modal-body .form-label {
    white-space: nowrap;
  }

  /* ==========================================================
  Simple Article List
  ========================================================== */
  .article-list {
    display: grid;
    gap: 1rem;
    /* padding-bottom: 1.250rem; */
    padding-bottom: 0.725rem;
  }

  .article-item {
    display: flex;
  }

  .article {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    color: var(--text-secondary);
  }

  .article-rank {
    min-width: 1rem;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.125;
  }

  .article-up,
  .article-down {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-muted);
    flex-shrink: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    transition: var(--transition-fast);
    vertical-align: middle;
  }

  .article-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent-muted) !important;
    background-color: var(--background-secondary) !important;
    vertical-align: middle;
  }
  
  .article-icon.circle {
    border-radius: 50rem;
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-light);
  }

  .article-up:hover {
    color: var(--accent-primary);
  }

  .article > div {
    flex: 1;
  }

  .article-digg {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: row;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    vertical-align: middle;
  }
  
  .article-digg li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
  }

  .article-title {
    font-size: 1rem;
    margin: 0;
  }

  .article-title a {
    text-decoration: none;
    transition: var(--transition-fast);
  }

  .article-title a:hover {
    text-decoration: underline;
  }

  .article-title .article-source {
    color: var(--text-secondary);
    margin-left: 0.375rem;
  }

  .article-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
  }

  .article-meta .link {
    color: var(--accent-primary);
  }

  .article-meta .link:hover {
    color: var(--accent-hover);
  }

  /* Responsive adjustments */
  @media only screen and (min-width: 1024px) {
    .article-item {
      flex-direction: column;
      gap: 0.375rem;
    }

    .article-rank {
      width: auto;
      text-align: left;
    }
  }

  /* ==========================================================
   Pagination
   ========================================================== */
  .pagination {
    margin: 0rem 0;
  }

  .pagination-list {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination-item {
    display: grid;
  }

  .pagination-btn {
    background: none;
    border: 1px solid #cccccc;
    color: var(--text-primary);
    padding: 0.125rem 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    font-size: inherit;
  }

  .pagination-btn:hover:not(:disabled):not(.active) {
    border-color: #006666;
    color: #006666;
    background-color: rgba(0, 102, 102, 0.1);
  }

  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: default;
  }

  .pagination-btn.active,
  .pagination-btn.current {
    background-color: #006666 !important;
    color: #ffffff !important;
    border-color: #006666 !important;
  }

  .pagination-ellipsis {
    display: inline-block;
    padding: 0.375rem 0.5rem;
    color: var(--text-secondary);
  }

  /* ==========================================================
  Slashdot-Style Comments Controls
  ========================================================== */
  .slashdot-comments-container {
    background: #fff;
    border: 1px solid #ddd;
  }

  .slashdot-comments-controls {
    background: linear-gradient(to bottom, #2c7e7e, #1f6060);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    border-bottom: 2px solid #1a4d4d;
    gap: 0.75rem;
  }

  .controls-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
  }

  .control-link {
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
  }

  .control-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700;
  }

  .control-link:active {
    background: rgba(255, 255, 255, 0.25);
  }

  .control-post-btn {
    background: none;
    border: none;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
  }

  .control-post-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700;
  }

  .control-post-btn:active {
    background: rgba(255, 255, 255, 0.25);
  }

  .control-separator {
    color: #fff;
    opacity: 0.7;
    margin: 0 0.25rem;
  }

  .controls-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
  }

  .comment-threshold-control {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .threshold-label {
    color: #fff;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
    font-size: 0.9375rem;
  }

  .threshold-type {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }

  .threshold-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 3px;
    margin: 0 0.375rem;
  }

  .threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #1f6060;
  }

  .threshold-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #1f6060;
  }

  .icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.3125rem 0.4375rem;
    opacity: 0.9;
    transition: all 0.2s ease;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .icon-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
  }

  .icon-btn:active {
    background: rgba(255, 255, 255, 0.15);
  }

  /* Comments Filter Bar */
  .slashdot-comments-filter {
    background: #e8e8e8;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: 1px solid #ccc;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .filter-label {
    font-size: 0.8125rem;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .filter-tabs {
    display: flex;
    gap: 0.375rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .filter-tab {
    background: #ffffff !important;
    border: 2px solid #555 !important;
    color: #222 !important;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.3125rem 0.625rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }

  .filter-tab:hover {
    background: #f5f5f5 !important;
    border-color: #333 !important;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .filter-tab:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  }

  .filter-tab.active {
    background: #2c7e7e !important;
    border-color: #1f6060 !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
  }

  .filter-tab.active:hover {
    background: #235959 !important;
    border-color: #1a4d4d !important;
  }

  /* Fine Print */
  .slashdot-fine-print {
    background: #fff;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #666;
    border-bottom: 1px solid #ddd;
    text-align: center;
  }

  .slashdot-fine-print strong {
    color: #333;
  }

  /* Mobile adjustments for controls */
  @media (max-width: 739px) {
    .slashdot-comments-controls {
      flex-direction: column;
      align-items: stretch;
      gap: 0.75rem;
      padding: 0.75rem;
    }

    .controls-left {
      justify-content: center;
      font-size: 0.9375rem;
    }

    .controls-right {
      width: 100%;
      justify-content: center;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .comment-threshold-control {
      width: 100%;
      padding: 0.5rem;
      gap: 0.375rem;
      font-size: 0.8125rem;
    }

    .threshold-slider {
      width: 100%;
      order: 10;
      margin: 0.25rem 0;
    }

    .threshold-label {
      font-size: 0.875rem;
    }

    .threshold-type {
      font-size: 0.6875rem;
    }

    .icon-btn {
      font-size: 0.9375rem;
      padding: 0.375rem 0.625rem;
    }

    .slashdot-comments-filter {
      flex-direction: row;
      align-items: center;
      gap: 0.5rem;
      padding: 0.625rem 0.75rem;
      flex-wrap: wrap;
    }

    .filter-label {
      width: 100%;
      margin-bottom: 0.25rem;
      font-size: 0.75rem;
    }

    .filter-tabs {
      width: 100%;
      justify-content: center;
      gap: 0.375rem;
    }

    .filter-tab {
      font-size: 0.75rem;
      padding: 0.375rem 0.625rem;
      flex: 1 1 auto;
      min-width: fit-content;
    }

    .slashdot-fine-print {
      font-size: 0.6875rem;
      padding: 0.625rem 0.75rem;
      text-align: left;
      line-height: 1.4;
    }
  }

  /* ==========================================================
  Comment Thread - Slashdot-style threaded comments
  ========================================================== */
  
  /* Comment list container */
  .comment-list,
  .content-view-children {
    background: #fff;
  }

  /* Individual comment - Slashdot exact styling */
  .comment-item,
  li.comment {
    display: list-item;
    list-style: none;
    position: relative;
    padding: 0;
    margin: 0 20px 10px 0;
    background: transparent;
    border: 1px solid #c8c8c8;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
  }

  /* Nested indentation via margin-left on li */
  li.comment[style*="margin-left"] {
    /* margin-left is set inline via template */
  }

  .comment-item > div {
    flex: 1;
    min-width: 0;
  }

  /* Highlight animation for anchored comments */
  .comment-item.comment-highlight {
    animation: highlightComment 2s ease;
  }

  @keyframes highlightComment {
    0% {
      background-color: #ffffcc;
      box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
    }
    100% {
      background-color: transparent;
      box-shadow: none;
    }
  }

  /* Smooth scroll behavior for anchor navigation */
  html {
    scroll-behavior: smooth;
  }

  /* Collapse button - Slashdot style */
  /* Collapse button - positioned below digg control, exact same size as pentagram */
  .comment-collapse-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #000;
    color: #000;
    font-family: verdana, sans-serif;
    font-weight: normal;
    cursor: pointer;
    padding: 3px 2px 2px 2px;
    margin: 4px 0 8px 0;
    text-align: center;
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    min-height: 1.5rem;
    border-radius: 3px;
    gap: 0px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .comment-collapse-btn svg {
    color: #000;
    stroke: #000;
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
  }

  .comment-collapse-btn .collapse-btn-text {
    color: #000;
    font-size: 0.6rem;
    line-height: 1;
    white-space: nowrap;
    font-weight: bold;
  }

  .comment-collapse-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #333;
  }

  .comment-collapse-btn:active {
    background: rgba(0, 0, 0, 0.1);
  }

  /* Comment header */
  .comment-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
  }

  .comment-header-title {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    margin: 0;
    font-size: 13px;
    font-weight: bold;
  }

  .comment-header-title a,
  .comment-title-full,
  .comment-title-abbreviated {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    line-height: 1.3;
  }

  .comment-header-title a:hover {
    text-decoration: underline;
  }

  .comment-header-title .comment-score {
    font-size: 11px;
    font-weight: normal;
    color: #666;
    margin: 0;
  }

  .comment-header p {
    margin: 0;
    line-height: 1.4;
  }

  /* Vote arrow */
  .comment-up {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
  }

  .comment-up:hover {
    color: #ff6600;
  }

  /* Author */
  .comment-author {
    color: #006666;
    text-decoration: none;
    font-weight: normal;
  }

  .comment-author:hover {
    text-decoration: underline;
  }

  /* Score badge */
  .article-score,
  .comment-score {
    font-size: 11px;
    font-weight: normal;
    color: #666;
    background: none;
    border: none;
    padding: 0;
  }

  /* Byline - Slashdot style */
  .comment-byline {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
  }

  /* Comment ID */
  .comment-id {
    color: #999;
    font-size: 10px;
  }

  /* Time + metadata links */
  .comment-time {
    color: #666;
    font-size: 11px;
  }

  .comment-header a {
    color: #006666;
    text-decoration: none;
  }

  .comment-header a:hover {
    text-decoration: underline;
  }

  /* Comment body - Slashdot style */
  .comment-body {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.5;
    color: #000;
  }

  .comment-body p {
    margin: 0 0 8px 0;
    line-height: 1.5;
  }

  .comment-body p:last-child {
    margin-bottom: 0;
  }

  /* Comment actions */
  .comment-actions {
    margin-top: 8px;
    font-size: 11px;
  }

  .comment-actions a {
    color: #006666;
    text-decoration: none;
    margin-right: 0.75rem;
  }

  .comment-actions a:hover {
    color: #ff8833;
    text-decoration: underline;
  }

  .comment-actions .btn-sm {
    border-radius: 3px;
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(to bottom, #fff, #f5f5f5);
    border: 1px solid #ccc;
  }

  .comment-actions .btn-sm:hover {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border-color: #999;
  }

  /* Collapsed state */
  .comment-item > div.collapsed .comment-body,
  .comment-item > div.collapsed .comment-actions,
  .comment-item > div.collapsed .comment-header p {
    display: none;
  }

  .comment-item > div.collapsed .comment-header {
    margin-bottom: 0;
  }

  .comment-item > div.collapsed .comment-header-title {
    opacity: 0.7;
  }

  /* Title display variants */
  .comment-title-abbreviated {
    display: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
  }

  /* Abbreviated state - hide body, actions, byline; show preview in title */
  .comment-item > div.abbreviated .comment-body,
  .comment-item > div.abbreviated .comment-actions,
  .comment-item > div.abbreviated .comment-byline {
    display: none;
  }

  .comment-item > div.abbreviated .comment-title-full {
    display: none;
  }

  .comment-item > div.abbreviated .comment-title-abbreviated {
    display: inline !important;
    vertical-align: baseline !important;
  }

  .comment-item > div.abbreviated .comment-score {
    display: inline !important;
    vertical-align: baseline !important;
  }
  
  .comment-item > div.abbreviated .comment-title-full {
    display: none !important;
  }

  .comment-item > div.abbreviated .comment-header {
    margin-bottom: 0;
    line-height: 1.2;
  }

  .comment-item > div.abbreviated .comment-header-title {
    flex-wrap: nowrap;
    gap: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-items: center;
    height: auto;
    line-height: 1.2;
  }

  .comment-item > div.abbreviated {
    opacity: 0.85;
  }

  /* Make abbreviated comments more compact */
  .comment-item:has(> div.abbreviated) {
    padding: 2px 8px;
    margin-bottom: 2px;
    min-height: auto;
  }

  /* Collapsed comment styling */
  .comment-item:has(> div.collapsed) {
    background: rgba(240, 240, 240, 0.5);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  /* Hide nested comments when parent is collapsed */
  .comment-item:has(> div.collapsed) + .comment-item[style*="margin-left"] {
    display: none;
  }

  /* Nested comments */
  .comment-children {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-subtle);
    display: grid;
    gap: 0.5rem;
  }

  /* Mobile adjustments */
  @media (max-width: 739px) {
    .comment-item {
      padding-left: 0.5rem;
      gap: 0.375rem;
      padding-top: 0.375rem;
      padding-bottom: 0.375rem;
    }

    .comment-header {
      font-size: 0.75rem;
    }

    .comment-header-title a {
      font-size: 0.875rem;
    }

    .comment-body {
      font-size: 0.8125rem;
    }

    .comment-collapse-btn {
      font-size: 0.675rem;
      padding: 0.125rem 0.25rem;
    }

    .comment-actions {
      font-size: 0.75rem;
    }

    .comment-actions a {
      margin-right: 0.5rem;
    }
  }

  /* Reduce visual weight for deep nesting */
  .comment-children .comment-children {
    border-left-color: var(--border-muted);
  }

  /* ========================================
     Slashdot-specific comment structure
     ======================================== */
  
  /* Comment wrapper */
  li.comment .cw {
    display: block;
  }

  /* Comment header - Slashdot commentTop */
  .commentTop {
    background: transparent;
    color: #000;
    margin: 0;
    padding: 0;
    display: block;
  }

  .commentTop .title {
    margin: 0;
    padding: 0;
    display: block;
  }

  .commentTop .title h4 {
    font-weight: bold;
    font-family: arial, serif;
    margin: -1px -1px 0;
    padding: 4px 20px;
    color: #fff;
    background-color: #004242;
    font-size: 13px;
    line-height: 1.3;
    display: block;
  }

  .commentTop .title h4 a {
    color: #fff;
    text-decoration: none;
  }

  .commentTop .title h4 a:hover {
    text-decoration: underline;
  }

  .commentTop .score {
    font-weight: normal;
    font-size: 13px;
    color: #fff;
  }

  .commentTop .details {
    background: #e1e1e1;
    color: #4d4d4d;
    padding: 6px 20px;
    margin: 0;
    font-size: 11px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Voting controls in details section */
  .commentTop .details form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    align-items: center;
  }

  .commentTop .details .article-digg {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    align-items: center;
  }

  .commentTop .details .article-digg li {
    display: inline-flex;
    margin: 0;
    padding: 0;
  }

  .commentTop .details .article-digg .article-up,
  .commentTop .details .article-digg .article-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    gap: 2px;
    font-size: 14px !important;
  }

  .commentTop .details .article-digg .article-icon.circle {
    width: auto;
    min-width: 18px;
    padding: 0 3px;
  }

  .commentTop .details .article-digg .digg-count {
    display: inline-flex;
    align-items: center;
    background: #ff6600;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 11px !important;
    margin-left: 4px;
    line-height: 1;
  }

  .commentTop .details .article-digg svg {
    width: 16px;
    height: 16px;
  }

  .commentTop .details .content-diggs {
    display: none;
  }

  .commentTop .details .by {
    color: #4d4d4d;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  /* Exact Slashdot comment header structure */
  #d2header {
    margin: 0 0 20px 0;
  }

  #d2header h2.commentspl {
    display: none; /* Hidden on Slashdot */
  }

  #d2header nav {
    display: block;
    background: #004242;
    background: -webkit-gradient(linear, left top, left bottom, from(#005555), to(#003333));
    background: linear-gradient(to bottom, #005555, #003333);
    padding: 10px 20px;
    margin: 0;
    overflow: hidden;
    min-height: 60px;
  }

  #d2header nav .grid_14 {
    float: left;
    width: 50%;
  }

  #d2header nav .grid_10 {
    float: right;
    width: 45%;
    text-align: right;
  }

  #d2header nav .btn {
    display: inline-block;
    background: #006666;
    color: #fff;
    padding: 6px 12px;
    margin-right: 8px;
    border: 1px solid #004d4d;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
  }

  #d2header nav .btn:hover {
    background: #007777;
  }

  #d2header nav .btn.first {
    margin-left: 0;
  }

  #d2header nav .ind {
    display: none;
  }

  #d2header nav form {
    display: inline;
    margin: 0;
    padding: 0;
  }

  #d2header nav form button {
    font-family: inherit;
  }

  /* Slider section */
  #d2out {
    position: relative;
    width: 100%;
  }

  #d2act {
    position: relative !important;
    width: 100%;
  }

  .loki, #gods {
    color: #fff;
    font-size: 11px;
    width: 100%;
  }

  #bones {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
  }

  .ccw-count-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    width: 100%;
  }

  .ccw-count-text {
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }

  .ccw-count-text span:first-child {
    font-weight: bold;
  }

  .tcenter {
    text-align: center;
  }

  .tright {
    text-align: right;
  }

  /* Slider styling */
  #slider-container {
    margin-top: 5px;
    position: relative;
    width: 100%;
  }

  #comment-threshold-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #004d4d;
    outline: none;
    opacity: 0.9;
    -webkit-appearance: none;
    appearance: none;
  }

  #comment-threshold-slider:hover {
    opacity: 1;
  }

  #comment-threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00cccc;
    cursor: pointer;
    border: 2px solid #fff;
  }

  #comment-threshold-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00cccc;
    cursor: pointer;
    border: 2px solid #fff;
  }

  /* Comment Filter Section - Exact Slashdot structure */
  section#besttabs,
  #besttabs {
    display: block !important;
    background: #e1e1e1;
    padding: 13px 20px 10px;
    margin: 0;
    font-size: 13px;
    clear: both;
  }

  #besttabs .legend {
    display: inline;
    font-size: 11px;
    padding: 0;
    margin: 0;
  }

  .besttabslist {
    display: inline-block;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
  }

  .besttabslist li {
    display: inline;
    margin: 0;
    padding: 0;
  }

  .besttabslist li a {
    color: #006666;
    text-decoration: none;
    padding: 0;
    margin: 0 6px;
  }

  .besttabslist li a:hover {
    text-decoration: underline;
  }

  .besttabslist li.active a {
    color: #999999;
    font-weight: 700;
    text-decoration: none;
  }

  aside.grid_24 {
    padding: 15px 20px;
    margin: 0;
    font-size: 13px;
    background: #fff;
    clear: both;
  }

  aside.grid_24 p {
    margin: 0;
    padding: 0;
  }

  aside.grid_24 small {
    font-size: 11px;
  }

  /* Clear floats and add spacing before comments */
  .content-view-children {
    clear: both;
    margin-top: 20px;
  }

  .content-view-children > ul.comment {
    margin-top: 0;
  }

  .commentTop .details .byby {
    color: #4d4d4d;
  }

  .commentTop .details .comment-author {
    color: #006666;
    text-decoration: none;
  }

  .commentTop .details .comment-author:hover {
    text-decoration: underline;
  }

  .commentTop .details .uid {
    color: #666;
  }

  .commentTop .details .uid a {
    color: #666;
    text-decoration: none;
  }

  .commentTop .details .uid a:hover {
    text-decoration: underline;
  }

  .commentTop .details .otherdetails {
    color: #666;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .commentTop .details .otherdetails a {
    color: #006666;
    text-decoration: none;
  }

  .commentTop .details .otherdetails a:hover {
    text-decoration: underline;
  }

  /* Comment body - Slashdot commentBody */
  .commentBody {
    padding: 20px 20px 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    background: transparent;
    display: block;
  }

  .commentBody p {
    margin: 0 0 10px 0;
  }

  .commentBody a {
    color: #006666;
    text-decoration: underline;
  }

  /* Comment controls - Slashdot commentSub */
  .commentSub {
    padding: 0 20px 10px;
    margin: 0;
    background: transparent;
    display: block;
  }

  .commentSub .btn.link {
    background: none;
    border: none;
    color: #006666;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    padding: 0;
    margin-right: 10px;
  }

  .commentSub .btn.link:hover {
    text-decoration: underline;
  }

  /* Ensure comment-item with Slashdot classes displays correctly */
  li.comment.comment-item {
    display: list-item;
    list-style: none;
  }

  /* Override comment-body styles when using commentBody */
  li.comment .commentBody {
    font-size: 13px;
  }

  /* Abbreviated comment display - Slashdot oneline style */
  /* Show: body + reply, Hide: title + details */
  li.comment.abbrev .commentTop .title,
  li.comment.abbrev .commentTop .details,
  li.comment.abbreviated .commentTop .title,
  li.comment.abbreviated .commentTop .details,
  li.comment.oneline .commentTop .title,
  li.comment.oneline .commentTop .details {
    display: none !important;
  }

  /* Hidden comments */
  li.comment.hidden {
    display: none !important;
  }

  /* Remove old flexbox styles that conflict */
  li.comment.comment-item .article-digg {
    /* Voting controls already positioned by their own styles */
  }

  /* Responsive adjustments */
  @media only screen and (min-width: 1024px) {
    /* .comment-body,
    .comment-actions {
      margin-left: 2rem;
    } */

    .comment-header {
      flex-wrap: nowrap;
      white-space: nowrap;
    }

    .comment-children {
      margin-left: 1rem;
    }
  }

  /* ==========================================================
  Auth Section
  ========================================================== */
  .auth-section .container {
    padding-block: 3rem;
  }

  .auth-form {
    width: 100%;
    max-width: 32rem;
    margin-inline: auto;
    padding: 2rem;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-medium);
    background-color: var(--background-primary);
  }

  .auth-form-header {
    margin-bottom: 1rem;
  }

  .auth-form-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  .auth-form-footer {
    margin-top: 1rem;
  }

  /* ==========================================================
  Comment Form
  ========================================================== */
  .comment-form {
    margin: 1.5rem 1.5rem 2.5rem 1.5rem;
  }

  /* ==========================================================
  Generic Content
  ========================================================== */
  .generic-content-list {
    display: grid;
    gap: 1.5rem;
  }

  .section-description h2 {
    font-size: 1.25rem;
  }

  .section-description h3 {
    margin-block: 1rem 0.5rem;
  }

  .section-description p {
    margin-bottom: 1rem;
  }

  .generic-content-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .generic-content-item p:not(:last-child) {
    margin-bottom: 0.5rem;
  }

  .generic-content-item ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    display: grid;
    gap: 0.5rem;
    list-style-type: disc;
  }

  /* ==========================================================
  Generic Content
  ========================================================== */
  .legal-content {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem 3rem;
  }

  @media only screen and (min-width: 1024px) {
    .legal-content {
      align-items: flex-start;
      flex-direction: row;
    }
  }

  .legal-content-wrapper {
    flex: 1;
    display: grid;
    gap: 3.5rem;
  }

  .legal-content-title {
    text-transform: uppercase;
    margin-bottom: 0.375rem;
  }

  .legal-content-description {
    margin-bottom: 1.5rem;
  }

  /* ==========================================================
  Table of Contents
  ========================================================== */
  .table-of-contents {
    padding: 1rem;
    box-shadow: var(--shadow-medium);
    background-color: var(--background-primary);
  }

  @media only screen and (min-width: 1024px) {
    .table-of-contents {
      flex: 0 0 24rem;
      position: sticky;
      top: 3.5rem;
    }
  }

  .table-of-contents-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .table-of-contents-list {
    display: grid;
    gap: 0.5rem;
    list-style-type: decimal;
    list-style-position: inside;
  }

  /* ==========================================================
  Report Form
  ========================================================== */
  .report-form {
    padding-block: 1.5rem;
  }

  /* ==========================================================
  Settings Dock
  ========================================================== */
  .settings-dock {
    position: fixed !important;
    left: 100% !important;
    top: 35% !important;
    transform: translate(-100%, -50%) !important;
    background-color: hsl(var(--color-orange-500) / 0.85) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text-inverse) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0.25rem !important;
    border-radius: 0.5rem 0 0 0.5rem !important;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3) !important;
    z-index: 9999 !important;
    border: 2px solid hsl(var(--color-orange-700)) !important;
  }

  .settings-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: hsl(var(--color-white) / 0.15);
    border-radius: 0.25rem;
    border: none;
    padding: 0.2rem;
    transition: var(--transition-fast);
    color: var(--text-inverse);
  }

  .settings-btn:hover {
    background-color: hsl(var(--color-white) / 0.25);
    transform: scale(1.05);
  }

  .settings-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
  }

  /* ==========================================================
  Scroll to Top
  ========================================================== */
  .scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent-primary);
    box-shadow: var(--shadow-light);
    color: var(--text-inverse);
    cursor: pointer;
    z-index: 1100;
    pointer-events: none;

    /* Smooth fade-in/out */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
  }

  @media only screen and (min-width: 640px) {
    .scroll-to-top {
      right: 3rem;
    }
  }

  @media only screen and (min-width: 768px) {
    .scroll-to-top {
      right: 3.5rem;
    }
  }

  .scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .scroll-to-top:hover {
    background-color: var(--accent-hover);
  }
  
  .scroll-to-top .scroll-arrow {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--text-inverse);
  }

  /* ==========================================================
  Profile
  ========================================================== */
  .profile-cards {
    display: grid;
    gap: 1.5rem;
  }

  .attribute-profile-image {
    width: 10rem;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .attribute-profile-image img {
    border-radius: 0.375rem;
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-light);
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* ==========================================================
  Tag Clouds
  ========================================================== */
  .tag-cloud-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .tag-cloud-item {
    display: inline-flex;
  }

  .tag-cloud-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.625rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-accent);
    text-decoration: none;
    border-radius: 50rem;
    font-size: 0.875rem;
    transition: var(--transition-fast);
  }

  .tag-cloud-link:hover {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
  }

  /* ==========================================================
  Powered By
  ========================================================== */
  .poweredby-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  /* ==========================================================
  Breadcrumbs
  ========================================================== */
  .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
  }

  #path {
    margin-bottom: 0;
    padding-bottom: 00.40rem;
    padding-top: 0.1rem;
    height: 1rem;
    top: -.31rem;
    display: block;
    position: relative;

  }

  .breadcrumb-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
  }

  .breadcrumb-item:not(:has(a)):not(:has(span)) {
    color: var(--text-secondary);
    user-select: none;
  }

  .breadcrumb-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
  }

  .breadcrumb-link:hover,
  .breadcrumb-link:focus {
    color: var(--accent-hover);
    text-decoration: underline;
  }

  .breadcrumb-text {
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
  }

  .breadcrumbs {
    background-color: transparent;
  }

  /* ==========================================================
  Figures
  ========================================================== */
  .figure {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    background-color: #ffffff !important;
    padding: 1rem !important;
  }

  .figure.figure-thumbnail {
    max-width: 20rem;
    align-items: stretch;
  }

  .figure .figure-caption {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }

  .attribute-image {
    background-color: #ffffff !important;
    padding: 1rem !important;
    margin: 1.5rem 0;
  }

  /* ==========================================================
  Users
  ========================================================== */
  .user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
  }

  .user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background-color: var(--background-primary);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
  }

  .user-title {
    font-size: 1rem;
    text-transform: capitalize;
    transition: var(--transition-fast);
  }

  .user-title:hover {
    color: var(--accent-hover);
  }

  /* ==========================================================
  Misc
  ========================================================== */
  .rss-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: auto;
  }

  /* ==========================================================
  Rich Text
  ========================================================== */
  .rich-text h1,
  .rich-text h2,
  .rich-text h3,
  .rich-text h4,
  .rich-text h5,
  .rich-text h6 {
    margin-bottom: 0.75rem;
  }

  .rich-text p {
    margin-bottom: 1rem;
  }

  .rich-text a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
  }

  .rich-text a:hover {
    color: var(--accent-hover);
  }

  .rich-text img {
    max-width: 100%;
    height: auto;
  }

  .rich-text figure {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }

  .rich-text figure figcaption {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }

  .rich-text hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--border-primary);
  }

  .rich-text ul,
  .rich-text ol {
    margin-block: 1.5rem;
    padding-left: 1rem;
  }

  .rich-text ul {
    list-style-type: disc;
    display: grid;
    gap: 0.375rem;
  }

  .rich-text ol {
    list-style-type: decimal;
    display: grid;
    gap: 0.375rem;
  }

[data-theme="dark"] .dark-mode-btn .icon-sun {
  display: inline-block;
}

[data-theme="dark"] .dark-mode-btn .icon-moon {
  display: none;
}

[data-theme="dark"] .dark-mode-btn .icon-moon {
  opacity: 0;
}

[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath fill='%23FFF' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
}

/* Settings dock visibility in dark mode */
[data-theme="dark"] .settings-dock {
  background-color: hsl(var(--color-orange-500) / 0.9) !important;
  border-color: hsl(var(--color-orange-500)) !important;
}

[data-theme="dark"] .settings-btn {
  background-color: hsl(var(--color-white) / 0.2);
  color: var(--text-inverse);
}

[data-theme="dark"] .settings-btn:hover {
  background-color: hsl(var(--color-white) / 0.35);
}

/* ==========================================================
   SlashNews Theme Overrides - Ensure compatibility with Slashdot CSS
   ========================================================== */

/* Force settings dock to always be visible and positioned correctly */
.settings-dock {
  position: fixed !important;
  left: 100% !important;
  top: 35% !important;
  transform: translate(-100%, -50%) !important;
  z-index: 1100 !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure scroll-to-top button works */
.scroll-to-top {
  position: fixed !important;
  z-index: 1100 !important;
}

/* Ensure dark mode variables are applied to body and major containers */
[data-theme="dark"] body,
[data-theme="dark"] body.hnd,
[data-theme="dark"] #fh-paginate,
[data-theme="dark"] .container,
[data-theme="dark"] #firehose,
[data-theme="dark"] #firehoselist {
  background-color: var(--background-secondary) !important;
  color: var(--text-primary) !important;
}

/* Ensure article cards respect dark mode */
[data-theme="dark"] .fhitem,
[data-theme="dark"] .fhitem-story,
[data-theme="dark"] .article {
  background-color: var(--background-primary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

/* Ensure links work in dark mode */
[data-theme="dark"] a {
  color: var(--accent-hover) !important;
}

[data-theme="dark"] a:hover {
  color: var(--accent-hover) !important;
}

/* Ensure modals work in dark mode */
[data-theme="dark"] .modal,
[data-theme="dark"] .modal-backdrop.active {
  background-color: var(--background-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-close {
  color: hsl(var(--color-white)) !important;
}

/* Ensure header works in dark mode */
[data-theme="dark"] .header-main,
[data-theme="dark"] .nav-wrap,
[data-theme="dark"] .nav-primary {
  background-color: #000000 !important;
  color: #e0e0e0 !important;
  border-bottom: 1px solid #00aa88 !important;
}

/* Ensure footer works in dark mode */
[data-theme="dark"] #fhft,
[data-theme="dark"] #ft,
[data-theme="dark"] .footer-main {
  background-color: #000000 !important;
  color: #e0e0e0 !important;
  border-top: 1px solid #00aa88 !important;
}

[data-theme="dark"] .footer-main .footer-top,
[data-theme="dark"] .footer-main .footer-bottom {
  background-color: #000000 !important;
  border-top-color: #00aa88 !important;
}

[data-theme="dark"] .footer-main .footer-top .form-label,
[data-theme="dark"] .footer-main .footer-top label,
[data-theme="dark"] .footer-main .form-control,
[data-theme="dark"] .footer-main input[type="text"] {
  color: #e0e0e0 !important;
  background-color: #1a1a1a !important;
  border-color: #00aa88 !important;
}

[data-theme="dark"] .footer-main .poweredby-text,
[data-theme="dark"] .footer-main .poweredby-text a,
[data-theme="dark"] .footer-main .brand-logo,
[data-theme="dark"] .footer-main .text-accent {
  color: #99cccc !important;
}

[data-theme="dark"] #ft,
[data-theme="dark"] footer#ft {
  background: #000000 !important;
  background-image: none !important;
  border-top: 1px solid #00aa88 !important;
}

[data-theme="dark"] #ft nav ul li a,
[data-theme="dark"] footer#ft nav ul li a {
  color: #99cccc !important;
}

[data-theme="dark"] #ft nav ul li a:hover,
[data-theme="dark"] footer#ft nav ul li a:hover {
  color: #66ffff !important;
}

/* Pagination dark mode */
[data-theme="dark"] .pagination-btn {
  border-color: #555555;
  color: #e0e0e0;
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled):not(.active) {
  border-color: #00aa88;
  color: #00aa88;
  background-color: rgba(0, 170, 136, 0.1);
}

[data-theme="dark"] .pagination-btn.active,
[data-theme="dark"] .pagination-btn.current {
  background-color: #006666 !important;
  color: #ffffff !important;
  border-color: #006666 !important;
}

/* Search page - remove excessive top spacing */
body:has(.content-search) section.section {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body:has(.content-search) section.section .container {
  padding-top: 0 !important;
  margin-top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body:has(.content-search) .container {
  margin: 0.48rem -2rem 0rem 0rem !important;
}

body:has(.content-search) #path {
  display: none;
}

body:has(.content-search) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#firehose:has(.content-search) {
  margin-top: 0;
  padding-top: 0;
}

.content-search {
  padding-top: 0;
  margin-top: 0;
}

.content-search .attribute-header {
  margin-top: 0;
  padding-top: 0;
}

/* Add border to search result articles */
#firehose .content-search article {
  border-bottom: 1px solid rgb(229,229,229);
  padding: 0 20px;
  margin-bottom: 1rem;
}

#firehose .content-search article > p {
  margin: 0 0 20px;
}

/* Reduce spacing between breadcrumb path and content */
main.main {
  background-color: #ffffff;
}

section.section {
  background-color: #ffffff;
}

section.section .container {
  padding-top: 0.2rem;
  background-color: #ffffff;
}

.container {
  background-color: #ffffff;
}

#path {
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  margin: 0;
}

/* Remove top spacing from containers that come after path */
#path ~ .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#path ~ .container .main-wrap,
#path ~ .container .main-content {
  padding-top: 0;
}

#firehose:first-child {
  margin-top: 0;
  padding-top: 0;
}

/* Dark mode support for login/modal box */
[data-theme="dark"] #modal_cover {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] #modal_box {
  background-color: var(--background-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] #modal_box header.n,
[data-theme="dark"] #modal_box h3,
[data-theme="dark"] #modal_box h3.pf {
  background-color: var(--background-surface) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] #modal_box_content {
  background-color: var(--background-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] #modal-p > .pref,
[data-theme="dark"] #modal_box:not(.no_scrollbars) .n .fadeout,
[data-theme="dark"] #modal_box:not(.no_scrollbars) .n .fadeoutfade,
[data-theme="dark"] #modal_box_content .pref {
  background: var(--background-primary) !important;
  box-shadow: var(--background-primary) 0 11px 10px !important;
  -moz-box-shadow: var(--background-primary) 0 11px 10px !important;
  -webkit-box-shadow: var(--background-primary) 0 11px 10px !important;
}

[data-theme="dark"] #modal_box input[type="text"],
[data-theme="dark"] #modal_box input[type="password"],
[data-theme="dark"] #modal_box input[type="email"],
[data-theme="dark"] #modal_box textarea,
[data-theme="dark"] #modal_box select {
  background-color: var(--background-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

[data-theme="dark"] #modal_box input[type="submit"],
[data-theme="dark"] #modal_box button {
  background-color: var(--accent-primary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

[data-theme="dark"] #modal_box input[type="submit"]:hover,
[data-theme="dark"] #modal_box button:hover {
  background-color: var(--accent-hover) !important;
}

[data-theme="dark"] #modal_box a {
  color: var(--accent-primary) !important;
}

[data-theme="dark"] #modal_box a:hover {
  color: var(--accent-hover) !important;
}

[data-theme="dark"] #modal_box label {
  color: var(--text-primary) !important;
}

[data-theme="dark"] #modal_box fieldset {
  border-color: var(--border-primary) !important;
}

[data-theme="dark"] div.grid_24.pref ul.menu {
  background-color: var(--background-primary) !important;
}

/* Light mode text color fixes for modal */
#modal_box {
  color: #000000;
}

#modal_box h2,
#modal_box h3,
#modal_box p,
#modal_box label,
#modal_box span {
  color: inherit;
}

#modal_box_content {
  color: #000000;
}

#modal_box_content .auth-section,
#modal_box_content .auth-form {
  color: #000000;
}

#modal_box_content .auth-form-header h2,
#modal_box_content .auth-form-header p {
  color: #000000;
}

#modal_box_content .form-group label {
  color: #000000;
}

#modal_box_content .auth-form-footer p {
  color: #000000;
}

/* Modal content styling for login form */
#modal_box_content .auth-section {
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
}

#modal_box_content .auth-form {
  width: 100%;
}

#modal_box_content .auth-form-header {
  margin-bottom: 1.5rem;
}

#modal_box_content .auth-form-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#modal_box_content .auth-form-header p {
  font-size: 0.9rem;
  opacity: 0.8;
}

#modal_box_content .form-group {
  margin-bottom: 1rem;
}

#modal_box_content .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

#modal_box_content .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  background-color: #fff;
  color: #000;
}

#modal_box_content .form-control:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

#modal_box_content .btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: #ff6600;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

#modal_box_content .btn-primary:hover {
  background-color: #e55b00;
}

#modal_box_content .form-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

#modal_box_content .auth-form-footer {
  margin-top: 1.5rem;
  text-align: center;
}

#modal_box_content .auth-form-footer .link {
  color: #ff6600;
  text-decoration: none;
  font-weight: 500;
}

#modal_box_content .auth-form-footer .link:hover {
  text-decoration: underline;
}

/* Dark mode overrides for form controls */
[data-theme="dark"] #modal_box_content .form-control {
  background-color: var(--background-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

[data-theme="dark"] #modal_box_content .form-control:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2) !important;
}

/* Mobile header fixes for small devices (iPhone 16 Pro and similar) */
/* Mobile breakpoints now managed in snc-app.css */

/* Add missing icon definition for Ask link */
.icon-question-circle:before {
  content: '\e833';
}

/* Mobile: Reduce spacing between stories on home page */
@media only screen and (max-width: 919px) {
  /* Drastically reduce article spacing */
  article.briefarticle {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
  }
  
  /* Remove huge padding from article aside */
  #firehose article > aside {
    padding: 0 0 0.5em 0 !important;
  }
  
  /* Reduce footer spacing */
  .briefarticle footer {
    margin-bottom: 0 !important;
    padding-bottom: 0.5em !important;
  }
  
  /* Reduce general article spacing */
  #firehose article:not(.briefarticle .article-nel) {
    margin-top: 0 !important;
    margin-bottom: 0.50rem !important;
  }
  
  /* Reduce header spacing */
  #firehose article header {
    margin-bottom: 0.5em !important;
  }
  
  /* Reduce story body padding */
  #firehose article .body {
    padding-top: 0.5em !important;
    padding-bottom: 0.5em !important;
  }
}

/* Debug output accessibility fixes */
td.debugheader b,
td.debugheader b span,
.debugoutput td.debugheader b {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

/* Fix sr-only element contrast when visible */
.sr-only[style*="opacity: 1"] {
  color: rgb(255, 255, 255) !important;
  background-color: rgb(0, 77, 77) !important;
}

/* Mobile footer layout fixes - prevent collision/overflow on small screens */
@media only screen and (max-width: 739px) {
  /* Add clearfix to contain floated footer children */
  #fhft {
    overflow: hidden !important;
    display: flow-root !important;
  }
  
  #fhft nav {
    overflow: hidden !important;
    width: 100% !important;
  }
}

@media only screen and (max-width: 479px) {
  /* Keep original left/right layout but adjust sizing on very small screens */
  #fhft #logo_nf {
    float: left !important;
    text-align: left !important;
    width: auto !important;
    max-width: 48% !important;
    margin-bottom: 0 !important;
    display: block !important;
    min-height: 2.5rem !important;
    padding: 0.5rem 0.25rem 0.5rem 0 !important;
  }
  
  #fhft #logo_nf a {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
  }
  
  #fhft nav ul.submitstory {
    float: right !important;
    display: block !important;
    width: auto !important;
    max-width: 48% !important;
    text-align: right !important;
    margin-top: 0 !important;
    padding-right: 0 !important;
  }
  
  #fhft nav ul.submitstory li {
    display: inline-block !important;
    float: right !important;
  }
  
  #fhft nav ul.submitstory a,
  #fhft nav ul.submitstory button {
    font-size: 0.85rem !important;
    padding: 0.5rem 0 !important;
    white-space: nowrap !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Slashdot-style Footer Fortune/Quote Display
   ═══════════════════════════════════════════════════════════════════════════ */

.bq {
  padding: 2rem 1rem;
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fortune-wrap {
  display: block;
  max-width: 720px;
  width: 100%;
  padding: 0rem 0.3rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

/* Label row above the bubble */
.fortune-intro {
  margin: 0 0 0.8em;
  font-size: 0.85em;
  color: var(--text-secondary, #888);
  text-transform: none;
  line-height: 1.6;
}

.fortune-intro a {
  color: var(--link-color, #0066cc);
  text-decoration: none;
}

.fortune-intro a:hover {
  text-decoration: underline;
}

/* Speech-bubble box — white rounded rect with upward caret */
.fortune-box {
  position: relative;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  padding: 1.25em 1.75em;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color, #bbb);
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.05em;
  color: var(--text-primary, #111);
  line-height: 1.7;
  text-align: center;
  margin: 0.5rem 0;
}

.fortune-text {
  display: block;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* Upward-pointing caret (speech bubble tail) */
.fortune-box::before,
.fortune-box::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 3em;
  border: solid transparent;
  pointer-events: none;
}

.fortune-box::after {
  border-bottom-color: var(--bg-primary, #fff);
  border-width: 10px;
  margin-left: -10px;
}

.fortune-box::before {
  border-bottom-color: var(--border-color, #bbb);
  border-width: 11px;
  margin-left: -11px;
}

/* Meta line (date / source / archive) */
.fortune-meta {
  margin: 1em 0 0 !important;
  padding: 0.5rem 0 !important;
  font-size: 0.85em;
  color: var(--text-tertiary, #999);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.fortune-meta time {
  margin-right: 0.3em;
  font-weight: 500;
}

.fortune-source,
.fortune-archive {
  color: var(--link-secondary, #aaa);
  text-decoration: none;
  transition: color 0.2s ease;
}

.fortune-source:hover,
.fortune-archive:hover {
  color: var(--link-hover, #555);
  text-decoration: underline;
}

.fortune-archive {
  margin-left: 0.5em;
  font-size: 0.95em;
}

/* Mobile responsiveness */
@media only screen and (max-width: 739px) {
  .bq {
    padding: 1.5rem 0.75rem;
    margin: 1rem 0;
  }
  
  .fortune-wrap {
    padding: 1rem 0.5rem;
  }
  
  .fortune-box {
    padding: 1em 1.25em;
    font-size: 0.95em;
  }
  
  .fortune-intro {
    font-size: 0.8em;
  }
  
  .fortune-meta {
    font-size: 0.8em;
  }
}

@media only screen and (max-width: 479px) {
  .fortune-box {
    padding: 0.9em 1em;
    font-size: 0.9em;
    line-height: 1.6;
  }
  
  .fortune-intro {
    margin-bottom: 0.6em;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Header Message Bar - Site-wide notifications and CTAs
   ═══════════════════════════════════════════════════════════════════════════ */

.message-bar {
  background: #006666;
  padding: 0.75rem 1rem;
  text-align: left;
  color: #ffffff;
}

.message-bar p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #000000;
}

.message-bar a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 500;
}

.message-bar a:hover {
  color: #e0e0e0;
}

/* Dark mode support */
[data-theme="dark"] .message-bar {
  background: #004d4d;
}

/* Mobile responsive */
@media only screen and (max-width: 739px) {
  .message-bar {
    padding: 0.65rem 0.85rem;
  }
  
  .message-bar p {
    font-size: 0.85rem;
  }
}

@media only screen and (max-width: 479px) {
  .message-bar {
    padding: 0.6rem 0.75rem;
  }
  
  .message-bar p {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* ============================================================================
   Slashdot-style Pagination Navigator
   ============================================================================ */
.paginate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0rem 0.5rem 0;
  margin: 0rem 0;
  width: 100%;
}

/* Force pagination to full width - HTML5 validation fix */
[id^="fh-pag-div"],
#firehoselist [id^="fh-pag-div"] {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  flex-basis: 100% !important;
  flex-shrink: 0 !important;
  flex-grow: 1 !important;
}

[id^="fh-paginate"],
#firehoselist [id^="fh-paginate"] {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.25rem;
  flex-wrap: wrap;
}

#firehoselist > .row {
  width: 100% !important;
  clear: both;
}

/* Pagination container — 28% larger overall */
[id^="fh-pag-div"] .menu2[id^="fh-paginate"],
.paginate .menu2[id^="fh-paginate"] {
  font-size: 1.28em;
  line-height: 1.28;
}

/* Prev/Next buttons — scale width proportionally */
[id^="fh-pag-div"] a.prevnextbutact,
[id^="fh-pag-div"] a.prevnextbutdis {
  width: 100px;   /* 95px × 1.28 */
  padding: 6px;   /* 5px × 1.28 */
  font-size: 0.9rem;
}

/* Number spans — larger hit area, cursor pointer for JS click */
[id^="fh-paginate"] > span:not(.more) {
  padding: 0.5em 0.7em;
  cursor: pointer;
  min-width: 2.56em; /* 2em × 1.28 */
  display: inline-block;
  text-align: center;
}

/* Active span unchanged cursor */
[id^="fh-paginate"] > span.active {
  cursor: default;
}

.paginate .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #006666;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.paginate .btn:hover {
  background: #008080;
}

.paginate .btn.disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  pointer-events: none;
}

.paginate .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.5rem 0.75rem;
  background: #f5f5f5;
  color: #333333;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.paginate .page-link:hover {
  background: #006666;
  color: #ffffff;
}

.paginate .page-link.active {
  background: #006666;
  color: #ffffff;
  font-weight: 700;
  cursor: default;
}

.paginate .ellipsis {
  color: #666666;
  padding: 0 0.25rem;
  user-select: none;
}

/* Dark mode support */
[data-theme="dark"] .paginate .page-link {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

[data-theme="dark"] .paginate .page-link:hover {
  background: #006666;
  color: #ffffff;
}

[data-theme="dark"] .paginate .page-link.active {
  background: #006666;
  color: #ffffff;
}

[data-theme="dark"] .paginate .btn.disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #666666;
}

/* Mobile responsive */
@media only screen and (max-width: 739px) {
  .paginate {
    gap: 0.375rem;
    padding: 1.25rem 0.75rem;
  }
  
  .paginate .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .paginate .page-link {
    min-width: 2.25rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
}

@media only screen and (max-width: 479px) {
  .paginate {
    gap: 0.25rem;
    padding: 1rem 0.7rem 0rem 0.0rem;
  }
  
  .paginate .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.85rem;
  }
  
  .paginate .page-link {
    min-width: 2rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .paginate .ellipsis {
    padding: 0 0.125rem;
  }
}

/* ── Slashdot-style footer fortune ───────────────────────────────────────── */
.fortune-wrap {
    display: block;
    margin: 0.15em auto 1.25rem;
    max-width: 680px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}
/* Label row above the bubble */
.fortune-intro {
    margin: 0 0 .3em;
    font-size: .75em;
    color: #888;
    text-transform: none;
}
/* Speech-bubble box — white rounded rect with upward caret, matching Slashdot */
.fortune-box {
    position: relative;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: .65em 1.1em;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    font-size: .95em;
    color: #111;
    line-height: 1.5;
    text-align: center;
}
.fortune-text {
    font-size: 1.4em;
    line-height: 1.5;
}
/* Upward-pointing caret (speech bubble tail toward the Slashdot nav above) */
.fortune-box::before,
.fortune-box::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 2.5em;
    border: solid transparent;
    pointer-events: none;
}
.fortune-box::after {
    border-bottom-color: #fff;
    border-width: 8px;
    margin-left: -8px;
}
.fortune-box::before {
    border-bottom-color: #bbb;
    border-width: 9px;
    margin-left: -9px;
}
/* Meta line (date / source / archive) */
.fortune-meta {
    margin: .45em 0 0 !important;
    padding: 0 !important;
    font-size: .76em;
    color: #999;
    letter-spacing: .01em;
}
.fortune-meta time { margin-right: .2em; }
.fortune-source,
.fortune-archive {
    color: #aaa;
    text-decoration: none;
}
.fortune-source:hover,
.fortune-archive:hover { color: #555; text-decoration: underline; }
.fortune-archive { margin-left: .35em; }

