/* docket.netcivic.com */

:root {
  --bg: #0a0e13;
  --surface: #0d1117;
  --ink: #e6edf3;
  --ink-muted: #8b949e;
  --ink-hint: #484f58;
  --border: #21262d;
  --green: #3fb950;
  --green-dim: rgba(63, 185, 80, 0.08);
  --amber: #d29922;
  --amber-dim: rgba(210, 153, 34, 0.08);
  --red: #f85149;
  --red-dim: rgba(248, 81, 73, 0.08);
  --blue: #58a6ff;
  --blue-dim: rgba(88, 166, 255, 0.08);

  --font-display: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --space: 1.5rem;
  --max-w: 960px;
}

[data-theme="light"] {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #0e1525;
  --ink-muted: #4b5563;
  --ink-hint: #9ca3af;
  --border: #d1d5db;
  --green: #2d8a4e;
  --green-dim: rgba(45, 138, 78, 0.06);
  --amber: #b07a1a;
  --amber-dim: rgba(176, 122, 26, 0.06);
  --red: #c53030;
  --red-dim: rgba(197, 48, 48, 0.06);
  --blue: #3d6b8e;
  --blue-dim: rgba(61, 107, 142, 0.06);
}


/* Reset */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  border-top: 2px solid var(--blue);
}

h1, h2, h3, h4, p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}


/* Layout */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space);
}


/* Navigation */

.site-nav {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  line-height: 1;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.logo-dot {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-back {
  font-size: 0.75rem;
  color: var(--ink-hint);
  border-bottom: 1px solid transparent;
}

.nav-back:hover {
  color: var(--ink-muted);
  border-bottom-color: var(--border);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--ink-hint);
  font-size: 0.85rem;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--ink-muted);
  border-color: var(--ink-hint);
}


/* Hero */

.hero {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.hero-sub {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.hero-sync {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-hint);
  margin-top: 0.375rem;
}


/* Controls */

.controls {
  padding: 1rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 200px;
}

.search-input::placeholder {
  color: var(--ink-hint);
}

.search-input:focus {
  outline: none;
  border-color: var(--ink-muted);
}

.agency-filter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.agency-filter:focus {
  outline: none;
  border-color: var(--ink-muted);
}


/* Table */

.table-section {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.docket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.docket-table th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-hint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.docket-table th:nth-child(2) { width: 5.5rem; }
.docket-table th:nth-child(3) { width: 7.5rem; }
.docket-table th:nth-child(4) { width: 7rem; }
.docket-table th:nth-child(5) { width: 5.5rem; }

.docket-table th:hover {
  color: var(--ink-muted);
}

.docket-table th.sorted-asc::after {
  content: " \2191";
}

.docket-table th.sorted-desc::after {
  content: " \2193";
}

.docket-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docket-table tbody tr:hover {
  background: var(--surface);
}

.doc-title {
  font-weight: 500;
  color: var(--ink);
  max-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-title a {
  border-bottom: 1px solid transparent;
}

.doc-title a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.doc-agency {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.doc-location {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.doc-days {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.doc-days--urgent {
  color: var(--red);
}

.doc-days--warning {
  color: var(--amber);
}

.doc-days--normal {
  color: var(--green);
}

.row--critical {
  background: var(--red-dim);
  border-left: 2px solid color-mix(in srgb, var(--red) 60%, transparent);
}

.row--warning {
  background: var(--amber-dim);
  border-left: 2px solid var(--amber);
}


/* Empty state */

.no-data {
  padding: 3rem 0;
  text-align: center;
}

.no-data p {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.no-results {
  padding: 2rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-hint);
  display: none;
}


/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-source {
  font-size: 0.6875rem;
  color: var(--ink-hint);
}

.footer-source a {
  border-bottom: 1px solid var(--border);
}

.footer-source a:hover {
  color: var(--ink-muted);
}

.footer-meta {
  font-size: 0.6875rem;
  color: var(--ink-hint);
}

.footer-meta a {
  border-bottom: 1px solid var(--border);
}

.footer-meta a:hover {
  color: var(--ink-muted);
}


/* Responsive */

@media (max-width: 640px) {
  :root { --space: 1.25rem; }

  .hero { padding: 1.25rem 0 1rem; }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    min-width: 0;
  }

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

  .docket-table th:nth-child(3),
  .docket-table td:nth-child(3),
  .docket-table th:nth-child(4),
  .docket-table td:nth-child(4) {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
