/* ============================================================
   OpenScales Website — CSS
   Modelled on the PEBL site design system
   ============================================================ */

:root {
    --primary-blue: #0066cc;
    --primary-blue-dark: #004d99;
    --primary-blue-light: #3385d6;
    --accent-blue: #0099ff;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --topnav-height: 60px;
    --content-max-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
}

a { color: var(--primary-blue); text-decoration: none; }
a:hover { color: var(--primary-blue-dark); text-decoration: underline; }

/* ---- Top Navigation ---- */
.topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topnav-height);
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.topnav-inner {
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.topnav-brand:hover { color: var(--white); text-decoration: none; opacity: 0.92; }

.brand-icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1rem;
}

.topnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.topnav-links a {
    color: rgba(255,255,255,0.85);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.topnav-links a:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    text-decoration: none;
}

.topnav-links a.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

/* ── Nav dropdown ─────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle .nav-caret { font-size: 0.6rem; vertical-align: middle; margin-left: 2px; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 4px 0;
  z-index: 200;
  list-style: none;
  margin: 0;
}
.nav-dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: #1e293b;
  font-size: 0.875rem;
  white-space: nowrap;
}
.nav-dropdown-menu li a:hover { background: #f1f5f9; text-decoration: none; }
.nav-dropdown-menu li a.nav-soon { color: #94a3b8; cursor: default; }
.nav-dropdown-divider { border-top: 1px solid #e2e8f0; margin: 4px 0; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.badge-soon {
  display: inline-block;
  font-size: 0.6rem;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Repo tabs ────────────────────────────────────────────── */
.repo-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 0 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0;
}
.repo-tab {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px 6px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
}
.repo-tab:hover { color: #1e293b; background: #f8fafc; text-decoration: none; }
.repo-tab.active {
  color: var(--primary-blue, #2563eb);
  background: #fff;
  border-color: #e2e8f0;
  border-bottom-color: #fff;
}
.repo-tab.disabled { pointer-events: none; color: #cbd5e1; }
.tab-count {
  display: inline-block;
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 5px;
  font-weight: 600;
}
.repo-tab.active .tab-count {
  background: var(--primary-blue, #2563eb);
  color: #fff;
}

/* ── Repo description bar ─────────────────────────────────── */
.repo-desc-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  font-size: 0.85rem;
  color: #64748b;
}

/* ── Hero CTA button ──────────────────────────────────────── */
.btn-hero-primary {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-hero-primary:hover {
  background: rgba(255,255,255,0.3);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

/* ---- Page wrapper ---- */
.page-wrapper {
    margin-top: var(--topnav-height);
    min-height: calc(100vh - var(--topnav-height));
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    padding: 64px 0 56px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ---- Stats Bar ---- */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    box-shadow: var(--shadow-sm);
}

.stats-bar .container {
    display: flex;
    align-items: stretch;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border-right: 1px solid var(--gray-200);
    text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ---- Search & Filters Section ---- */
.filters-section {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: var(--topnav-height);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filters-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filters-domain-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.filters-domain-row .filter-label {
    padding-top: 5px;  /* align with button caps */
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    font-size: 1rem;
}

#search-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

#search-input:focus {
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

#search-input::placeholder { color: var(--gray-400); }

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.domain-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.btn-filter {
    padding: 5px 13px;
    border: 1.5px solid var(--gray-300);
    border-radius: 20px;
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-filter:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-filter.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.license-select {
    padding: 7px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.license-select:focus { border-color: var(--primary-blue); }

/* ---- Results info bar ---- */
.results-bar {
    padding: 14px 0 4px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ---- Scale Grid ---- */
.scale-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 0 48px;
}

/* ---- Scale Card ---- */
.scale-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
    cursor: pointer;
    min-width: 0;  /* allow card to shrink below content size */
    overflow: hidden;
}

.scale-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-blue-light);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    flex: 1;
}

.card-title a {
    color: var(--gray-900);
    text-decoration: none;
}

.card-title a:hover { color: var(--primary-blue); }

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-abbr {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.badge-domain {
    color: var(--white);
}

.badge-license {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.badge-items {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.card-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.lang-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: hidden;
    max-height: 46px; /* ~2 rows of pills */
    flex: 1;
}

.lang-pill {
    padding: 1px 7px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* .card-actions removed — links sit directly in .card-footer */

.card-run-link {
    font-size:       0.82rem;
    font-weight:     600;
    color:           #16a34a;
    white-space:     nowrap;
    text-decoration: none;
}

.card-run-link:hover { text-decoration: underline; }

.card-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-blue);
    white-space: nowrap;
    text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

/* ---- No results ---- */
#no-results {
    display: none;
    text-align: center;
    padding: 64px 24px;
    color: var(--gray-500);
}

#no-results h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--gray-700); }
#no-results p  { font-size: 0.925rem; }

/* ---- About Section ---- */
.about-section {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 56px 0;
}

.about-section h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.about-section p {
    color: var(--gray-600);
    max-width: 720px;
    margin-bottom: 14px;
    line-height: 1.7;
}

.about-section a { font-weight: 500; }

.about-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.about-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
}

.about-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-800); }
.about-card p  { font-size: 0.875rem; color: var(--gray-600); line-height: 1.55; }

/* ---- Footer ---- */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 28px 0;
    text-align: center;
    font-size: 0.85rem;
}

.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--white); }

/* ============================================================
   scale.php — Detail page
   ============================================================ */

.breadcrumb {
    padding: 16px 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb a { color: var(--primary-blue); }
.breadcrumb span { margin: 0 6px; }

.detail-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 32px 0 28px;
    box-shadow: var(--shadow-sm);
}

.detail-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gray-900);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-header h1 .abbr-badge {
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-blue);
    color: var(--white);
    padding: 3px 12px;
    border-radius: 14px;
    vertical-align: middle;
}

.detail-header .domain-line {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.detail-body {
    padding: 36px 0 56px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Metadata table */
.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.meta-table th {
    text-align: left;
    padding: 10px 16px 10px 0;
    width: 140px;
    color: var(--gray-500);
    font-weight: 600;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

.meta-table td {
    padding: 10px 0;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
}

/* Section headings on detail page */
.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 28px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* Description */
.description-text {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Dimensions list */
.dimensions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.dimensions-list li {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary-blue);
    padding: 8px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.dim-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-left: 8px;
}

/* Item table */
.item-instructions {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 12px;
}

.resp-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.resp-pill {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.items-table thead th {
    text-align: left;
    padding: 8px 10px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 600;
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.items-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.items-table tbody tr:hover {
    background: #eef4ff;
}

.items-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
    color: var(--gray-800);
}

.col-num {
    width: 36px;
    text-align: right;
    color: var(--gray-400) !important;
    font-size: 0.8rem;
    padding-right: 14px !important;
}

.col-dim {
    width: 160px;
    font-size: 0.8rem;
    color: var(--gray-500) !important;
}

.col-text {
    line-height: 1.5;
}

.col-rev {
    width: 28px;
    text-align: center;
    color: var(--gray-400) !important;
    font-size: 1rem;
}

.col-opts {
    max-width: 280px;
    font-size: 0.78rem;
}

.col-opts .resp-pill {
    font-size: 0.72rem;
    padding: 1px 5px;
    margin: 1px 2px 1px 0;
    display: inline-block;
}

.inst-row td {
    background: var(--gray-50) !important;
    font-style: italic;
    color: var(--gray-600);
    font-size: 0.88rem;
}

/* Citation block */
.citation-block {
    background: var(--gray-50);
    border-left: 4px solid var(--primary-blue-light);
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Sidebar card */
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--topnav-height) + 24px);
}

.sidebar-card h3 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.sidebar-card .btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-bottom: 10px;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.sidebar-card .btn:last-child { margin-bottom: 0; }

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-convert {
    background: var(--gray-50);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    font-size: 0.82rem;
}

.btn-convert:hover {
    background: var(--gray-100);
    color: var(--gray-900);
    text-decoration: none;
    transform: translateY(-1px);
}

.sidebar-section-head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    margin: 14px 0 6px;
}

.sidebar-meta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    font-size: 0.82rem;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-meta span { display: flex; gap: 6px; }
.sidebar-meta strong { color: var(--gray-700); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .about-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hero h1 { font-size: 1.75rem; }
    .scale-grid { grid-template-columns: 1fr; }
    .about-cards { grid-template-columns: 1fr; }
    .stats-bar .container { flex-wrap: wrap; }
    .stat-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid var(--gray-200); }
    .filters-top-row { flex-direction: column; align-items: stretch; }
    .filters-domain-row { flex-direction: column; align-items: stretch; }
    .search-wrapper { max-width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .sidebar-card { position: static; }
    .topnav-links { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 40px 0 36px; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 1rem; }
}

/* ============================================================
   Content pages — howto.php, contribute.php
   ============================================================ */

.code-block {
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: var(--radius-md, 6px);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.75rem 0 1.25rem;
}

.content-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.content-page h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.content-page h2:first-child {
    margin-top: 0;
    border-top: none;
}

.content-page h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-page p {
    color: var(--gray-700);
    line-height: 1.75;
    margin-bottom: 0.85rem;
}

.content-page ul,
.content-page ol {
    color: var(--gray-700);
    line-height: 1.75;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.3rem;
}

.content-page .meta-table {
    margin-bottom: 1.5rem;
}

/* Numbered step list */
.step-list {
    counter-reset: steps;
    list-style: none;
    padding: 0;
}

.step-list li {
    counter-increment: steps;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.step-list li::before {
    content: counter(steps);
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-list li > div {
    flex: 1;
}

/* Active nav link */
.topnav-links a.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

/* ============================================================
   faq.php
   ============================================================ */
.faq-list { margin: 0 0 32px; }
.faq-item { border-bottom: 1px solid var(--gray-200); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 1rem; font-weight: 600; color: var(--gray-900); margin-bottom: 8px; }
.faq-p { color: var(--gray-700); line-height: 1.65; }
.faq-section-head { font-size: 1.2rem; font-weight: 700; color: var(--primary-blue); margin: 32px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--gray-200); }

/* ============================================================
   submit.php — forms
   ============================================================ */
.submit-options { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
@media (max-width: 700px) { .submit-options { grid-template-columns: 1fr; } }
.submit-option-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 24px; }
.submit-option-card h3 { margin-bottom: 10px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: var(--gray-700); }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=number],
.form-group select,
.form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 0.9rem; font-family: inherit; }
.form-group textarea { min-height: 90px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: 2px solid var(--primary-blue); border-color: var(--primary-blue); }
.form-submit-btn { background: var(--primary-blue); color: var(--white); border: none; padding: 10px 28px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.form-submit-btn:hover { background: var(--primary-blue-dark); }
.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; }
.alert-error { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; }
.submit-section-head { font-size: 1.3rem; font-weight: 700; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--gray-200); }
