:root {
  --bg: #0d1014;
  --bg-2: #171b22;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.08);
  --border: rgba(190, 167, 126, 0.16);
  --border-2: rgba(190, 167, 126, 0.3);
  --text: #f1ede4;
  --text-2: #b7b0a3;
  --text-3: #807a70;
  --violet: #768396;
  --violet-glow: rgba(118, 131, 150, 0.12);
  --gold: #b9975b;
  --green: #8cb69d;
  --cyan: #9bb2c1;
  --radius: 16px;
  --sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(185, 151, 91, 0.12), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(118, 131, 150, 0.08), transparent 28%),
    linear-gradient(180deg, #151921 0%, #0d1014 56%, #090b0f 100%);
  color: var(--text);
  line-height: 1.62;
  letter-spacing: 0.01em;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(13, 16, 21, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.42rem;
  letter-spacing: 0.03em;
}

.nav-links,
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links {
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-2);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #c4a36a 0%, #ad8a50 100%);
  color: #13161b;
  border-color: rgba(222, 197, 149, 0.45);
  box-shadow: none;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #cfb079 0%, #b28f57 100%);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.page {
  padding: 40px 0 72px;
  display: grid;
  gap: 24px;
}

.hero,
.card {
  background: linear-gradient(180deg, rgba(24, 28, 34, 0.96), rgba(14, 17, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.hero {
  padding: 36px;
  display: grid;
  gap: 18px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(185, 151, 91, 0.08), transparent 42%);
  opacity: 0.55;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(185, 151, 91, 0.1);
  border: 1px solid rgba(185, 151, 91, 0.24);
  color: #d6c095;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

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

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(3rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  max-width: 820px;
}

h2 {
  font-size: 1.18rem;
}

h3 {
  font-size: 1.04rem;
}

p,
li {
  color: var(--text-2);
}

.hero-copy {
  max-width: 760px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section {
  display: grid;
  gap: 18px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
}

.kpi {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.kpi-label {
  margin-top: 6px;
  color: var(--text-2);
}

.quick-grid,
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.list-card {
  display: grid;
  gap: 12px;
}

.link-card {
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.link-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-2);
  background: rgba(255, 255, 255, 0.04);
}

.toolbar-card {
  position: sticky;
  top: 86px;
  z-index: 5;
}

.toolbar {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.35fr repeat(2, minmax(180px, 0.7fr));
  align-items: stretch;
}

.toolbar--simple {
  grid-template-columns: 1fr auto;
}

input,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 12px 14px;
  font: inherit;
}

input::placeholder {
  color: #96988f;
}

label.check {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  color: var(--text-2);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

label.check input {
  width: auto;
  margin: 0;
}

.toolbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.helper-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e8dfcf;
  font-size: 0.86rem;
}

.pill--accent {
  border-color: rgba(155, 178, 193, 0.22);
  background: rgba(155, 178, 193, 0.12);
  color: #dce8ef;
}

.pill--gold {
  border-color: rgba(185, 151, 91, 0.26);
  background: rgba(185, 151, 91, 0.14);
  color: #ead6af;
}

.results-card {
  overflow: hidden;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}

.results-title {
  display: grid;
  gap: 4px;
}

.results-count {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.muted {
  color: var(--text-2);
}

.muted-2 {
  color: var(--text-3);
}

.table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: #e1dbcf;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
  user-select: none;
}

th.sortable {
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

th.sortable:hover {
  color: #fff;
  background: rgba(155, 178, 193, 0.08);
}

th.sort-active {
  color: #f0e6d1;
  background: rgba(185, 151, 91, 0.08);
}

.sort-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.3;
}

.sort-asc .sort-arrow {
  opacity: 1;
  border-bottom: 5px solid currentColor;
}

.sort-desc .sort-arrow {
  opacity: 1;
  border-top: 5px solid currentColor;
}

td {
  color: #cbc4b7;
}

td a {
  color: #f4f0e8;
  text-decoration: none;
}

td a:hover {
  color: #fff;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.012);
}

tbody tr:hover {
  background: rgba(155, 178, 193, 0.07);
}

.row-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-link::after {
  content: "\2197";
  color: var(--text-3);
  font-size: 0.85rem;
}

.value-stack {
  display: grid;
  gap: 4px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--text-2);
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  margin-top: 22px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.footer-links a {
  color: var(--text-2);
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--text-3);
  font-size: 0.82rem;
  margin-top: 12px;
}

.page-tabs-wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.page-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.page-tabs a.active,
.page-tabs a:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: rgba(185, 151, 91, 0.08);
}

.page-tabs-copy {
  color: var(--text-2);
  font-size: 0.92rem;
}

.start-page {
  gap: 30px;
}

.start-page .hero {
  min-height: 360px;
  align-content: end;
  padding: 48px;
  background:
    linear-gradient(90deg, rgba(9, 11, 15, 0.94) 0%, rgba(9, 11, 15, 0.72) 48%, rgba(9, 11, 15, 0.28) 100%),
    linear-gradient(0deg, rgba(9, 11, 15, 0.86), rgba(9, 11, 15, 0.08)),
    url("/assets/renewal-town-hero-v1.png") center / cover no-repeat;
  border-color: rgba(185, 151, 91, 0.24);
}

.start-page .hero::after {
  background: linear-gradient(135deg, rgba(140, 182, 157, 0.18), transparent 42%);
  opacity: 0.65;
}

.start-page .hero > * {
  position: relative;
  z-index: 1;
}

.start-page .hero h1 {
  max-width: 700px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.start-page .hero-copy {
  max-width: 600px;
  color: #f7f2e7;
  font-size: 1.12rem;
}

.start-route {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(24, 28, 34, 0.98), rgba(12, 15, 20, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.start-route-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  background:
    linear-gradient(160deg, rgba(185, 151, 91, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.02);
}

.start-label {
  width: fit-content;
  color: #dec895;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.start-route-copy h2,
.start-section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.start-route-copy p,
.start-section-heading p,
.start-step p,
.start-system p {
  margin: 0;
  color: var(--text-2);
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.start-path {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.025);
}

.start-step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  padding: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.start-step:last-child {
  border-bottom: 0;
}

.start-step-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(140, 182, 157, 0.12);
  border: 1px solid rgba(140, 182, 157, 0.36);
  color: #bfe0ca;
  font-weight: 900;
  line-height: 1;
}

.start-step-body {
  display: grid;
  gap: 8px;
}

.start-step h3,
.start-system h3 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.start-step a,
.start-system a {
  width: fit-content;
  color: #dfc98f;
  font-weight: 800;
  border-bottom: 1px solid rgba(223, 201, 143, 0.34);
}

.start-systems {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 8px 0 0;
}

.start-section-heading {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 12px;
}

.start-system-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.start-system {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 24px 24px 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.start-system:nth-child(odd) {
  padding-right: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.start-system:nth-child(even) {
  padding-left: 28px;
}

.start-route,
.start-system {
  animation: start-fade-up 0.42s ease both;
}

.start-system:nth-child(2) { animation-delay: 0.04s; }
.start-system:nth-child(3) { animation-delay: 0.08s; }
.start-system:nth-child(4) { animation-delay: 0.12s; }

@keyframes start-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .start-route,
  .start-system {
    animation: none;
  }
}

.home-page h2,
.home-page h3,
.footer-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 980px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar--simple {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 16px;
  }

  nav {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-cta {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    padding: 24px;
  }

  .start-page .hero {
    min-height: 320px;
    padding: 30px 24px;
    background:
      linear-gradient(90deg, rgba(9, 11, 15, 0.95), rgba(9, 11, 15, 0.68)),
      url("/assets/renewal-town-hero-v1.png") center / cover no-repeat;
  }

  .start-route,
  .start-systems,
  .start-system-list {
    grid-template-columns: 1fr;
  }

  .start-route-copy,
  .start-step {
    padding: 24px;
  }

  .start-step {
    grid-template-columns: 54px 1fr;
    gap: 14px;
  }

  .start-step-number {
    width: 44px;
    height: 44px;
  }

  .start-section-heading {
    position: static;
  }

  .start-system,
  .start-system:nth-child(odd),
  .start-system:nth-child(even) {
    min-height: auto;
    padding: 22px 0;
    border-right: 0;
  }

  .toolbar-card {
    top: 120px;
  }

  .page-tabs-wrap {
    align-items: flex-start;
  }
}
