/* Parking Projects dashboard
 * Ecosystem tokens adapted from template-repo design-system v1.1.0.
 */

:root {
  color-scheme: light;

  --color-brand-900: #153b6b;
  --color-brand-800: #1d4d79;
  --color-brand-700: #245c8d;
  --color-brand-600: #2f6f9f;
  --color-brand-500: #4f82a8;
  --color-brand-100: #eaf2f8;
  --color-brand-50: #f5f9fc;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-subtle: #f3f4f6;
  --color-text: #1f2937;
  --color-text-muted: #5b6675;
  --color-border: #e5e7eb;
  --color-success: #2e7d32;
  --color-warning: #a15c00;
  --color-focus: #0b6ebd;
  --app-accent: #f2c230;
  --app-accent-strong: #2f638c;
  --app-accent-soft: #fff6d6;

  --font-sans: Inter, "Noto Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgb(17 24 39 / 8%);
  --touch-target-min: 2.75rem;
  --content-narrow: 42rem;
  --content-wide: 90rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-6);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: var(--line-height-tight);
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-brand-900);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: var(--color-brand-900);
  color: var(--color-surface);
  border-bottom: 4px solid var(--app-accent);
}

.header-inner,
.main-content,
.footer-inner {
  width: min(calc(100% - 2rem), var(--content-wide));
  margin-inline: auto;
}

.header-inner {
  padding-top: var(--space-5);
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand-lockup {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.project-label,
.eyebrow,
.card-label,
.current-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-label {
  color: rgb(255 255 255 / 72%);
}

.project-name {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.project-context {
  margin-top: var(--space-1);
  color: rgb(255 255 255 / 72%);
  font-size: var(--font-size-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ecosystem-link,
.menu-button,
.nav-link,
.button,
.text-link {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

.ecosystem-link {
  padding-inline: var(--space-3);
  border-radius: var(--radius-md);
  color: rgb(255 255 255 / 86%);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.ecosystem-link:hover {
  background: rgb(255 255 255 / 9%);
  color: var(--color-surface);
}

.menu-button {
  display: none;
  padding-inline: var(--space-4);
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
}

.menu-button:hover {
  background: rgb(255 255 255 / 9%);
}

.primary-nav {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-5);
}

.nav-link {
  position: relative;
  padding-inline: var(--space-4);
  color: rgb(255 255 255 / 76%);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-surface);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  right: var(--space-4);
  bottom: 0;
  left: var(--space-4);
  height: 3px;
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  background: var(--app-accent);
}

.mobile-ecosystem-link {
  display: none;
}

.main-content {
  flex: 1;
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.34fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: stretch;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--color-border);
  border-top: 5px solid var(--app-accent-strong);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.hero-copy-block {
  max-width: 55rem;
}

.eyebrow,
.card-label,
.current-label {
  margin-bottom: var(--space-2);
  color: var(--app-accent-strong);
}

.hero h1 {
  margin-bottom: var(--space-3);
  color: var(--color-brand-900);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: var(--content-narrow);
  margin-bottom: var(--space-8);
  color: var(--color-text-muted);
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  line-height: var(--line-height-relaxed);
}

.current-project {
  padding: var(--space-6);
  border-left: 4px solid var(--app-accent);
  background: var(--color-brand-50);
}

.current-project h2 {
  margin-bottom: var(--space-3);
  color: var(--color-brand-900);
  font-size: var(--font-size-2xl);
}

.current-project p:last-child {
  max-width: var(--content-narrow);
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
}

.hero-facts div {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.hero-facts dt,
.project-meta dt {
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.hero-facts dd,
.project-meta dd {
  margin: 0;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.button {
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--color-brand-900);
  color: var(--color-surface);
}

.button-primary:hover {
  background: var(--color-brand-700);
}

.button-secondary {
  border-color: var(--color-brand-700);
  color: var(--color-brand-900);
}

.button-secondary:hover {
  background: var(--color-brand-50);
}

.hero-marker {
  min-width: 0;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius-lg);
  background: var(--color-brand-900);
  color: var(--color-surface);
}

.marker-index {
  margin-bottom: auto;
  color: var(--app-accent);
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
}

.marker-line {
  width: 3rem;
  height: 4px;
  margin: var(--space-10) 0 var(--space-4);
  background: var(--app-accent);
}

.marker-label {
  color: rgb(255 255 255 / 72%);
  font-size: var(--font-size-sm);
}

.hero-marker strong {
  margin: var(--space-2) 0;
  font-size: var(--font-size-xl);
}

.hero-marker > span:last-child {
  color: rgb(255 255 255 / 72%);
  font-size: var(--font-size-sm);
}

.section-block {
  margin-top: var(--space-20);
  scroll-margin-top: var(--space-6);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--color-brand-900);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.section-heading > p {
  max-width: var(--content-narrow);
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.8fr) auto;
  gap: var(--space-8);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--app-accent-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.project-card h3 {
  margin: var(--space-4) 0 var(--space-3);
  color: var(--color-brand-900);
  font-size: var(--font-size-2xl);
}

.project-card-main > p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.status-badge {
  width: fit-content;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-inline: var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.status-active {
  background: var(--app-accent-soft);
  color: var(--color-brand-900);
}

.status-active span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-success);
}

.project-meta {
  display: grid;
  gap: var(--space-4);
  margin: 0;
}

.text-link {
  width: fit-content;
  color: var(--color-brand-700);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: var(--space-1);
}

.text-link span {
  margin-left: var(--space-2);
}

.future-note {
  margin: var(--space-4) 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.overview-card {
  position: relative;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.card-index {
  position: absolute;
  top: var(--space-5);
  right: var(--space-6);
  margin: 0;
  color: var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--font-size-3xl);
  font-weight: 700;
}

.overview-card h3 {
  max-width: 80%;
  margin-bottom: var(--space-4);
  color: var(--color-brand-900);
  font-size: var(--font-size-2xl);
}

.overview-card > p:not(.card-label, .card-index, .assumption-note) {
  color: var(--color-text-muted);
}

.overview-card > .text-link,
.card-links {
  margin-top: auto;
}

.assumption-note {
  padding: var(--space-4);
  border-left: 3px solid var(--color-warning);
  background: var(--app-accent-soft);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.status-section {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: var(--color-brand-900);
  color: var(--color-surface);
}

.status-section .eyebrow,
.status-section .section-heading h2 {
  color: var(--color-surface);
}

.source-note {
  color: rgb(255 255 255 / 72%);
  font-size: var(--font-size-sm);
}

.source-note a {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  color: var(--color-surface);
  font-weight: 700;
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.status-summary div {
  padding: var(--space-5);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 6%);
}

.status-summary span,
.status-summary strong {
  display: block;
}

.status-summary span {
  margin-bottom: var(--space-2);
  color: rgb(255 255 255 / 70%);
  font-size: var(--font-size-sm);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  vertical-align: middle;
}

thead {
  background: var(--color-surface-subtle);
}

thead th {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody tr + tr {
  border-top: 1px solid var(--color-border);
}

tbody th {
  font-weight: 600;
}

td {
  width: 13rem;
  font-weight: 600;
}

.status-symbol {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-grid;
  place-items: center;
  margin-right: var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
}

.status-confirmed {
  background: #e7f4e8;
  color: var(--color-success);
}

.status-next {
  background: var(--app-accent-soft);
  color: var(--color-warning);
}

.status-pending {
  border: 2px solid var(--color-text-muted);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.action-panel {
  min-height: 20rem;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.action-panel h2 {
  margin-bottom: var(--space-4);
  color: var(--color-brand-900);
  font-size: var(--font-size-2xl);
}

.action-panel > p:not(.eyebrow, .tbc-note) {
  color: var(--color-text-muted);
}

.next-panel {
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--app-accent);
}

.next-panel .text-link {
  margin-top: auto;
}

.check-list {
  padding: 0;
  margin: var(--space-5) 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 1.12rem;
  left: 0;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--color-warning);
}

.tbc-note {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.decisions-section {
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  list-style: none;
}

.decision-grid li {
  min-height: 6.5rem;
  display: flex;
  align-items: center;
  padding: var(--space-5);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
}

.decision-grid li:nth-child(3n) {
  border-right: 0;
}

.decision-grid li:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.document-link {
  min-height: 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}

.document-link:hover {
  border-color: var(--color-brand-500);
  background: var(--color-brand-50);
}

.document-link span {
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.document-link strong {
  color: var(--color-brand-900);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.safety-note {
  max-width: 62rem;
  margin-top: var(--space-20);
  padding: var(--space-8);
  border-left: 5px solid var(--app-accent-strong);
  background: var(--color-surface-subtle);
}

.safety-note h2 {
  margin-bottom: var(--space-3);
  color: var(--color-brand-900);
  font-size: var(--font-size-2xl);
}

.safety-note p:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.site-footer {
  margin-top: var(--space-16);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.footer-main,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}

.footer-links a {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: var(--space-1);
}

.build-id {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

@media (max-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.3fr);
    gap: var(--space-8);
  }

  .project-card {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.65fr);
  }

  .project-card > .text-link {
    grid-column: 1 / -1;
  }

  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid li,
  .decision-grid li:nth-child(3n),
  .decision-grid li:nth-last-child(-n + 3) {
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }

  .decision-grid li:nth-child(2n) {
    border-right: 0;
  }

  .decision-grid li:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

@media (max-width: 48rem) {
  .header-inner,
  .main-content,
  .footer-inner {
    width: min(calc(100% - 1.5rem), var(--content-wide));
  }

  .ecosystem-link {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    flex-direction: column;
    padding-bottom: var(--space-4);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .mobile-ecosystem-link {
    display: inline-flex;
  }

  .nav-link.is-active::after {
    top: 0.5rem;
    right: auto;
    bottom: 0.5rem;
    left: 0;
    width: 3px;
    height: auto;
    border-radius: var(--radius-pill);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-marker {
    min-height: 13rem;
  }

  .marker-index {
    margin-bottom: 0;
  }

  .marker-line {
    margin-top: var(--space-8);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-4);
  }

  .project-card,
  .overview-grid,
  .action-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .project-card > .text-link {
    grid-column: auto;
  }

  .overview-card {
    min-height: 0;
  }

  .overview-card > .text-link,
  .card-links {
    margin-top: var(--space-5);
  }

  .status-summary {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody tr {
    padding: var(--space-4);
  }

  tbody th,
  tbody td {
    padding: var(--space-1) 0;
  }

  tbody td {
    color: var(--color-text-muted);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 30rem) {
  .project-name {
    font-size: var(--font-size-lg);
  }

  .project-context {
    display: none;
  }

  .hero-facts,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .decision-grid li,
  .decision-grid li:nth-child(2n),
  .decision-grid li:nth-child(3n),
  .decision-grid li:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .decision-grid li:last-child {
    grid-column: auto;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .site-header,
  .status-section,
  .hero-marker {
    border: 1px solid CanvasText;
  }

  .status-active span,
  .status-symbol,
  .check-list li::before {
    forced-color-adjust: none;
  }
}
