/* ==========================================================================
   MarqueUS — Modern Legal/Corporate Design
   A clean, professional stylesheet for a USPTO trademark directory.
   Typography: DM Serif Display (headings) + Source Sans 3 (body)
   Colors: Navy #1B2A4A + Gold #C9952B
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. CSS Custom Properties
   --------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --navy:         #1B2A4A;
    --navy-dark:    #111D33;
    --navy-mid:     #1F3461;
    --navy-light:   #2A4578;
    --gold:         #C9952B;
    --gold-light:   #D4A94A;
    --gold-pale:    #F5ECD7;

    /* Status Colors */
    --green:        #16a34a;
    --green-light:  #dcfce7;
    --green-dark:   #166534;
    --red:          #dc2626;
    --red-light:    #fee2e2;
    --red-dark:     #991b1b;
    --orange:       #ea580c;
    --orange-light: #fff7ed;
    --orange-dark:  #9a3412;

    /* Neutrals (Slate palette) */
    --slate-50:     #f8fafc;
    --slate-100:    #f1f5f9;
    --slate-200:    #e2e8f0;
    --slate-300:    #cbd5e1;
    --slate-400:    #94a3b8;
    --slate-500:    #64748b;
    --slate-600:    #475569;
    --slate-700:    #334155;
    --slate-800:    #1e293b;
    --slate-900:    #0f172a;

    /* Background */
    --bg-body:      #fafaf9;
    --bg-white:     #ffffff;

    /* Typography */
    --font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --container-pad: 1rem;

    /* Radius */
    --radius-sm:    0.375rem;
    --radius-md:    0.5rem;
    --radius-lg:    0.75rem;
    --radius-xl:    1rem;
    --radius-2xl:   1.25rem;
    --radius-full:  9999px;

    /* Shadows */
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg:    0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl:    0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

    /* Transitions */
    --transition:   200ms ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    color: var(--slate-800);
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------------------
   3. Typography
   --------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.25;
    color: var(--navy);
}

h1 { font-size: 2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.625rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--slate-600); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--slate-800); }

/* ---------------------------------------------------------------------------
   4. Layout
   --------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

@media (min-width: 640px) {
    :root { --container-pad: 1.5rem; }
}
@media (min-width: 1024px) {
    :root { --container-pad: 2rem; }
}

.site-main {
    flex: 1;
    padding: 2rem 0;
}

.site-main > .container > section,
.site-main > .container > article > section {
    margin-bottom: 3rem;
}

.site-main > .container > article > header {
    margin-bottom: 2rem;
}

/* ---------------------------------------------------------------------------
   5. Header
   --------------------------------------------------------------------------- */
.site-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-xl);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.site-logo:hover { color: #fff; opacity: 0.9; }

.logo-icon svg { display: block; }
.logo-icon svg circle { stroke: var(--gold); }
.logo-icon svg text { fill: var(--gold); }

.logo-text {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Navigation */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Header search */
.site-header .search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: all var(--transition);
    max-width: 280px;
    flex-shrink: 1;
}

.site-header .search-form:focus-within {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 0 3px rgba(201,149,43,0.3);
}

.site-header .search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    width: 100%;
    min-width: 0;
}

.site-header .search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.site-header .search-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    transition: color var(--transition);
    flex-shrink: 0;
}
.site-header .search-btn:hover { color: var(--gold); }

/* Mobile menu toggle */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    transition: all var(--transition);
}
.mobile-menu-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 0;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.625rem 0.75rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.mobile-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.mobile-menu .search-form {
    margin-top: 0.75rem;
    max-width: 100%;
}

/* Responsive header */
@media (max-width: 767px) {
    .main-nav { display: none; }
    .site-header > .container > .header-inner > .search-form { display: none; }
    .mobile-menu-btn { display: flex; }
}

/* ---------------------------------------------------------------------------
   6. Breadcrumbs
   --------------------------------------------------------------------------- */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    color: var(--slate-500);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.375rem;
    color: var(--slate-300);
}

.breadcrumb a {
    color: var(--slate-500);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb [aria-current="page"] {
    color: var(--slate-800);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   7. Hero Section
   --------------------------------------------------------------------------- */
.hero {
    position: relative;
    margin: -2rem calc(-1 * var(--container-pad)) 2.5rem;
    padding: 3.5rem var(--container-pad) 3rem;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-mid) 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
    background-size: 20px 20px;
}

.hero h1 {
    position: relative;
    color: #fff;
    font-size: 2.25rem;
    max-width: 720px;
    margin: 0 auto 1rem;
}

.hero-sub {
    position: relative;
    color: rgba(255,255,255,0.8);
    font-size: 1.0625rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Hero search */
.hero-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-hero {
    display: flex;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition);
}

.search-form-hero:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 0 0 4px rgba(201,149,43,0.25);
}

.search-input-hero {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    min-width: 0;
}

.search-input-hero::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-btn-hero {
    background: var(--gold);
    color: var(--navy-dark);
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: background var(--transition);
    white-space: nowrap;
}

.search-btn-hero:hover {
    background: var(--gold-light);
}

@media (min-width: 640px) {
    .hero { padding: 4rem 2rem 3.5rem; }
    .hero h1 { font-size: 2.75rem; }
}

/* ---------------------------------------------------------------------------
   8. Stats Grid
   --------------------------------------------------------------------------- */
.home-stats {
    margin-top: -1.5rem;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--navy);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Smaller stats grid for detail/owner pages */
.stats-grid-small {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid-small { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---------------------------------------------------------------------------
   9. Status Badges
   --------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.2em 0.65em;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-live {
    background: var(--green-light);
    color: var(--green-dark);
}

.badge-dead {
    background: var(--red-light);
    color: var(--red-dark);
}

.badge-pending {
    background: var(--orange-light);
    color: var(--orange-dark);
}

.badge-live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.badge-dead::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.badge-pending::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* ---------------------------------------------------------------------------
   10. Class Grid (45 Nice Classes)
   --------------------------------------------------------------------------- */
.class-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.class-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    padding: 1rem;
    transition: all var(--transition);
    text-decoration: none;
}

.class-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: inherit;
}

.class-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-lg);
    background: var(--gold-pale);
    color: var(--gold);
    font-weight: 800;
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
    flex-shrink: 0;
}

.class-card:hover .class-card-number {
    background: var(--gold);
    color: #fff;
}

.class-card-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--slate-700);
    line-height: 1.35;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.class-card-count {
    font-size: 0.6875rem;
    color: var(--slate-400);
    margin-top: auto;
}

@media (min-width: 640px) {
    .class-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .class-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .class-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------------------------------------------------------------------------
   11. State Grid
   --------------------------------------------------------------------------- */
.state-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.state-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
    text-decoration: none;
}

.state-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
    color: inherit;
}

.state-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
}

.state-card:hover .state-card-name {
    color: var(--navy);
}

.state-card-count {
    font-size: 0.75rem;
    color: var(--slate-400);
    white-space: nowrap;
}

@media (min-width: 640px) {
    .state-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .state-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------------------------------------------------------------------------
   12. Trademark Cards
   --------------------------------------------------------------------------- */
.tm-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tm-card {
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: all var(--transition);
}

.tm-card:hover {
    border-color: var(--slate-300);
    box-shadow: var(--shadow-md);
}

.tm-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tm-card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
}

.tm-card-name a {
    color: var(--navy);
    text-decoration: none;
}
.tm-card-name a:hover {
    color: var(--gold);
}

.tm-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--slate-500);
}

.tm-card-serial,
.tm-card-reg {
    background: var(--slate-100);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.75rem;
}

.tm-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--slate-600);
}

.tm-card-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tm-card-details svg {
    color: var(--slate-400);
    flex-shrink: 0;
}

.tm-card-details a {
    color: var(--navy);
    font-weight: 500;
}
.tm-card-details a:hover { color: var(--gold); }

.tm-card-date {
    font-size: 0.75rem;
    color: var(--slate-400);
}

.tm-card-date time { color: var(--slate-500); }

/* ---------------------------------------------------------------------------
   13. Data Tables
   --------------------------------------------------------------------------- */
.data-table {
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.data-table thead {
    background: var(--slate-50);
    border-bottom: 2px solid var(--slate-200);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--slate-700);
    border-top: 1px solid var(--slate-100);
    vertical-align: top;
}

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--slate-50); }

.data-table td a { color: var(--navy); font-weight: 500; }
.data-table td a:hover { color: var(--gold); }

/* Key-value style (trademark detail — tables without thead) */
.data-table:not(:has(thead)) th {
    background: var(--slate-50);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--slate-600);
    white-space: nowrap;
    width: 200px;
    text-transform: none;
    letter-spacing: 0;
    border-top: 1px solid var(--slate-100);
}

.data-table:not(:has(thead)) tr:first-child th,
.data-table:not(:has(thead)) tr:first-child td {
    border-top: none;
}

/* Responsive table wrapper */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------------------
   14. Pagination
   --------------------------------------------------------------------------- */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.625rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    color: var(--slate-600);
}

.pagination a {
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
}

.pagination a:hover {
    background: var(--slate-50);
    border-color: var(--gold);
    color: var(--gold);
}

.pagination-current {
    background: var(--navy) !important;
    color: #fff !important;
    border-color: var(--navy) !important;
    font-weight: 700 !important;
}

.pagination-ellipsis {
    color: var(--slate-300);
    border: none;
}

.pagination-prev,
.pagination-next {
    font-weight: 600;
    padding: 0 0.875rem;
}

.pagination-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border: none !important;
    background: transparent !important;
}

/* ---------------------------------------------------------------------------
   15. Trademark Detail Page
   --------------------------------------------------------------------------- */
.trademark-detail {
    max-width: 900px;
}

.tm-header {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--slate-200);
}

.tm-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.tm-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--slate-500);
}

.tm-header-meta strong {
    color: var(--slate-700);
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.8125rem;
}

/* Section cards in detail page */
.trademark-detail > section {
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.trademark-detail > section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--slate-100);
}

.trademark-detail > section h3 {
    font-size: 1.05rem;
    color: var(--navy-light);
    margin-top: 1rem;
}

.trademark-detail .data-table {
    box-shadow: none;
    border-radius: var(--radius-lg);
}

/* Blockquote (goods & services) */
blockquote {
    background: var(--slate-50);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

blockquote p {
    color: var(--slate-700);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Class link */
.class-link {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}
.class-link a {
    color: var(--gold);
    font-weight: 600;
}
.class-link a:hover { color: var(--navy); }

/* Related lists */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-list li {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--slate-600);
    transition: background var(--transition);
}

.related-list li:hover {
    background: var(--slate-50);
}

.related-list a {
    color: var(--navy);
    font-weight: 600;
}
.related-list a:hover { color: var(--gold); }

/* ---------------------------------------------------------------------------
   16. Listing Pages (common patterns)
   --------------------------------------------------------------------------- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list li {
    font-size: 0.875rem;
    color: var(--slate-600);
}

.tag-list a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-full);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all var(--transition);
}

.tag-list a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.ranked-list {
    list-style: decimal;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ranked-list li {
    font-size: 0.9375rem;
    color: var(--slate-600);
    padding: 0.25rem 0;
}

.ranked-list a { color: var(--navy); font-weight: 600; }
.ranked-list a:hover { color: var(--gold); }

/* Owner list on home */
.owner-list {
    overflow-x: auto;
}

/* ---------------------------------------------------------------------------
   17. Search Page
   --------------------------------------------------------------------------- */
.search-page-form {
    max-width: 640px;
    margin: 0 auto 2rem;
}

.search-page-form .search-form {
    display: flex;
    background: var(--bg-white);
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition);
}

.search-page-form .search-form:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27,42,74,0.12);
}

.search-page-form .search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    min-width: 0;
    background: transparent;
}

.search-page-form .search-btn {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    transition: background var(--transition);
}
.search-page-form .search-btn:hover { background: var(--navy-light); }

/* ---------------------------------------------------------------------------
   18. Content Pages (about, nice-classification, etc.)
   --------------------------------------------------------------------------- */
.content-page {
    max-width: 820px;
}

.content-page h2 {
    margin-top: 2rem;
}

.content-page h3 {
    margin-top: 1.5rem;
}

.content-page p {
    line-height: 1.75;
}

.content-page ul,
.content-page ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.content-page ul { list-style: disc; }
.content-page ol { list-style: decimal; }

.content-page li {
    margin-bottom: 0.375rem;
    color: var(--slate-600);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* ---------------------------------------------------------------------------
   19. Section Headers (used in listing pages)
   --------------------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

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

.section-header a {
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition);
    white-space: nowrap;
}

.section-header a:hover {
    color: var(--navy);
}

/* ---------------------------------------------------------------------------
   20. Footer
   --------------------------------------------------------------------------- */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-400);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-grid h3 {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--slate-400);
    font-size: 0.8125rem;
    transition: color var(--transition);
    line-height: 1.4;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links-compact {
    gap: 0.375rem;
}

.footer-links-compact a {
    font-size: 0.75rem;
}

.footer-col h3 + h3 {
    margin-top: 1.5rem;
}

.footer-disclaimer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.5rem 0;
}

.footer-disclaimer p {
    font-size: 0.6875rem;
    color: var(--slate-500);
    line-height: 1.7;
    max-width: 800px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.5rem 0 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--slate-500);
}

.footer-bottom a {
    color: var(--gold);
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
}

/* ---------------------------------------------------------------------------
   21. Utility Classes
   --------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--slate-500); }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------------------
   22. Responsive Breakpoints
   --------------------------------------------------------------------------- */
@media (max-width: 639px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .hero h1 { font-size: 1.75rem; }
    .hero { padding: 2.5rem 1rem 2rem; }
    .hero-sub { font-size: 0.9375rem; }

    .search-btn-hero {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .stat-number { font-size: 1.375rem; }

    .tm-header h1 { font-size: 1.375rem; }

    .trademark-detail > section {
        padding: 1rem;
    }

    .data-table:not(:has(thead)) th {
        display: block;
        width: 100%;
        padding-bottom: 0.125rem;
        border-top: 1px solid var(--slate-100);
    }
    .data-table:not(:has(thead)) td {
        display: block;
        padding-top: 0;
        border-top: none;
    }
    .data-table:not(:has(thead)) tr:first-child th {
        border-top: none;
    }
}

@media (max-width: 479px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .tm-card-header { flex-direction: column; gap: 0.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .pagination a, .pagination span { min-width: 2rem; height: 2rem; font-size: 0.8125rem; }
}

/* ---------------------------------------------------------------------------
   23. Print Styles
   --------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .breadcrumb,
    .pagination,
    .search-form,
    .hero-search { display: none; }

    body { background: #fff; color: #000; }
    .site-main { padding: 0; }

    .trademark-detail > section {
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    a { color: #000; }
    a::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #666; }
}
