:root {
  --text: #151515;
  --muted: #3e3e3e;
  --line: #d8d8d8;
  --soft-line: #e8e4dd;
  --purple: #473a9e;
  --purple-bg: #ededff;
  --purple-border: #b9b2ff;
  --green: #00594b;
  --green-bg: #dcf7ee;
  --green-border: #6bd4b9;
  --rust: #8b2d16;
  --rust-bg: #fff0e9;
  --rust-border: #ff9b7f;
  --blue: #075aa7;
  --blue-bg: #e6f3ff;
  --blue-border: #91c7ff;
  --shadow: 0 18px 46px rgba(20, 20, 20, 0.12);
  --font-body: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Sora", "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #fff;
  font-family: var(--font-body);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.storefront {
  min-height: 100vh;
  background: #fffaf6;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 48px;
  background: rgba(255, 250, 246, 0.92);
  border-bottom: 1px solid rgba(139, 45, 22, 0.12);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.brand-lockup span {
  color: var(--muted);
  font-weight: 750;
}

.public-nav nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-weight: 800;
}

.public-main {
  padding: 0 0 64px;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 96px);
  width: 100%;
  margin: 0;
  padding: 68px max(48px, calc((100vw - 1180px) / 2)) 56px;
  overflow: hidden;
}

.temple-hero {
  background:
    linear-gradient(90deg, rgba(21, 15, 12, 0.88) 0%, rgba(62, 29, 18, 0.72) 42%, rgba(62, 29, 18, 0.28) 70%, rgba(21, 15, 12, 0.1) 100%),
    linear-gradient(180deg, rgba(21, 15, 12, 0.12), rgba(21, 15, 12, 0.56)),
    url("assets/kalika-temple-hero-optimized.jpg") center right / cover;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.98;
  color: #fff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy > p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 21px;
  line-height: 1.55;
}

.nepali-title {
  margin: 0 0 18px;
  color: #ffd9c5;
  font-size: clamp(30px, 4vw, 48px) !important;
  font-weight: 850;
}

.nepali-copy {
  color: #8b2d16;
  font-weight: 700;
}

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

.primary-action,
.secondary-action,
.register-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
}

.primary-action,
.register-button {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

.temple-hero .section-kicker {
  color: #ffd9c5;
}

.temple-hero .nepali-copy {
  color: #ffeade;
}

.temple-hero .primary-action {
  background: #c94a28;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.temple-hero .secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.primary-action,
.secondary-action {
  transition: transform 160ms ease, background 160ms ease;
}

.temple-hero .primary-action:hover,
.temple-hero .secondary-action:hover {
  transform: translateY(-1px);
}

.hero-emblem {
  display: grid;
  place-items: center;
  min-height: 240px;
  justify-self: end;
  align-self: start;
  margin-top: 18px;
}

.hero-emblem img {
  width: clamp(128px, 17vw, 220px);
  max-width: 220px;
  max-height: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 8px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.34));
  backdrop-filter: blur(4px);
}

.photo-credit {
  position: absolute;
  right: 24px;
  bottom: 16px;
  max-width: min(520px, calc(100% - 48px));
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  text-align: right;
}

.photo-credit a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.info-grid,
.feature-band,
.contact-strip {
  width: min(1180px, 100%);
  margin: 28px auto 22px;
}

.info-grid,
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-grid article,
.feature-band,
.contact-strip {
  border: 1px solid rgba(139, 45, 22, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 24px;
}

.info-grid h2,
.feature-band h2,
.contact-strip h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
}

.info-grid p,
.feature-list p,
.contact-strip p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.info-grid .nepali-copy,
.feature-band .nepali-copy,
.contact-strip .nepali-copy {
  color: #8b2d16;
}

.feature-band {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 24px;
  align-items: start;
}

.feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-list article {
  border-left: 3px solid var(--rust-border);
  padding-left: 16px;
}

.feature-list h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(7, 90, 167, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 6;
}

.site-header > div:not(.header-actions) {
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.site-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  object-fit: contain;
}

.site-header h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}

.site-header p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.25;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(7, 90, 167, 0.1);
  background: #f7fafc;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #363636;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 750;
  padding: 0 18px;
}

.tab.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

main {
  padding: 24px 32px 56px;
}

.storefront .public-main {
  padding: 0 0 64px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tree-wrap,
.paths-wrap {
  position: relative;
  margin: 0 auto;
  overflow-x: auto;
}

.registry-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(230, 243, 255, 0.82), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fafc 46%, #fffaf6 100%);
}

.registry-board {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(7, 90, 167, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 60px rgba(20, 38, 56, 0.08);
  overflow: hidden;
}

.tree-wrap {
  width: 100%;
  height: min(430px, calc(100vh - 320px));
  min-height: 310px;
  background:
    linear-gradient(rgba(7, 90, 167, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 90, 167, 0.04) 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
}

.connector-lines {
  position: absolute;
  inset: 0;
  width: 1140px;
  height: 510px;
}

.connector-lines path {
  fill: none;
  stroke: #d5d0ca;
  stroke-width: 2;
  stroke-linecap: square;
}

.member {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 260px;
  min-height: 90px;
  transform: translateX(-50%);
  border: 1px solid;
  border-radius: 12px;
  padding: 13px 16px;
  text-align: center;
}

.member h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
}

.member p {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
}

.member small {
  display: inline-block;
  margin-bottom: 6px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-tree {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100% - 28px));
  transform: translate(-50%, -50%);
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 48px rgba(20, 38, 56, 0.1);
}

.empty-tree h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
}

.empty-tree p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.member.ancestor {
  color: var(--purple);
  border-color: var(--purple-border);
  background: var(--purple-bg);
}

.member.second {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-bg);
}

.member.diaspora {
  color: var(--rust);
  border-color: var(--rust-border);
  background: var(--rust-bg);
}

.member.india {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-bg);
}

.tree-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 18px 22px;
  border-top: 1px solid rgba(7, 90, 167, 0.1);
  background: rgba(247, 250, 252, 0.9);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: #86827d;
  font-size: 15px;
  font-weight: 700;
}

.tree-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-items: end;
}

.tree-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.swatch {
  width: 18px;
  height: 18px;
  border: 1px solid;
  border-radius: 7px;
  display: inline-block;
}

.swatch.ancestor {
  border-color: var(--purple-border);
  background: var(--purple-bg);
}

.swatch.second {
  border-color: var(--green-border);
  background: var(--green-bg);
}

.swatch.diaspora {
  border-color: var(--rust-border);
  background: var(--rust-bg);
}

.swatch.india {
  border-color: var(--blue-border);
  background: var(--blue-bg);
}

.link-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 850;
  padding: 0 16px;
}

.paths-wrap {
  width: min(980px, 100%);
  height: 690px;
}

.path-lines {
  position: absolute;
  inset: 0;
  width: 980px;
  height: 690px;
}

.path-lines path {
  fill: none;
  stroke-width: 2;
}

.green-line {
  stroke: var(--green-border);
  marker-end: url("#arrow-green");
}

.purple-line {
  stroke: var(--purple-border);
  marker-end: url("#arrow-purple");
}

.orange-line {
  stroke: var(--rust-border);
  marker-end: url("#arrow-orange");
}

#arrow-green path {
  fill: var(--green-border);
}

#arrow-purple path {
  fill: var(--purple-border);
}

#arrow-orange path {
  fill: var(--rust-border);
}

.dashed {
  stroke-dasharray: 7 9;
}

.path-card {
  position: absolute;
  left: 520px;
  width: 620px;
  min-height: 96px;
  transform: translateX(-50%);
  border: 1px solid;
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
}

.path-card h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.1;
}

.path-card p {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.path-card.green {
  color: var(--green);
  border-color: #2f8e79;
  background: var(--green-bg);
}

.path-card.purple {
  color: var(--purple);
  border-color: #8378ff;
  background: var(--purple-bg);
}

.path-card.orange {
  color: var(--rust);
  border-color: #cf6b4d;
  background: var(--rust-bg);
}

.path-card.top {
  top: 0;
}

.path-card.parent {
  top: 180px;
}

.path-card.profile {
  top: 365px;
  width: 400px;
}

.path-card.child {
  top: 535px;
}

.path-card.invite {
  top: 660px;
  transform: translate(-50%, -100%);
}

.path-label {
  position: absolute;
  left: 58px;
  color: var(--muted);
  font-size: 25px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.path-label.ancestors {
  top: 210px;
}

.path-label.new-gen {
  top: 500px;
}

.path-note {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 25px;
  text-align: center;
}

.map-view {
  position: relative;
  width: min(980px, 100%);
  height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #eef7fb, #f9fbfc);
}

.map-shape {
  position: absolute;
  border-radius: 42% 58% 48% 52%;
  background: #d2e0d3;
}

.america {
  width: 180px;
  height: 290px;
  left: 110px;
  top: 130px;
  background: #eacfc7;
}

.europe {
  width: 145px;
  height: 112px;
  left: 500px;
  top: 118px;
  background: #e6dcc2;
}

.asia {
  width: 260px;
  height: 205px;
  right: 120px;
  top: 140px;
}

.australia {
  width: 150px;
  height: 82px;
  right: 120px;
  bottom: 96px;
  background: #cfdfef;
}

.pin {
  position: absolute;
  min-width: 88px;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: center;
  font-weight: 700;
}

.pin b {
  color: var(--green);
}

.nepal {
  right: 245px;
  top: 210px;
}

.uk {
  left: 520px;
  top: 104px;
}

.usa {
  left: 160px;
  top: 190px;
}

.aus {
  right: 130px;
  bottom: 108px;
}

.india-pin {
  right: 210px;
  top: 260px;
}

.search-box,
.results {
  width: min(900px, 100%);
  margin: 0 auto;
}

.search-box {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

label {
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 90, 167, 0.12);
}

.results {
  display: grid;
  gap: 12px;
}

.result-card {
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  padding: 16px;
}

.result-card h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
}

.result-card p {
  margin: 0;
  color: var(--muted);
}

.access-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1140px, 100%);
  margin: 0 auto 22px;
}

.access-card,
.review-board {
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  padding: 22px;
  background: #fff;
}

.access-card {
  border-color: var(--green-border);
  background: linear-gradient(180deg, var(--green-bg), #fff);
}

.admin-card {
  border-color: var(--purple-border);
  background: linear-gradient(180deg, var(--purple-bg), #fff);
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.access-card h2,
.review-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.18;
}

.access-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
}

.access-card ul {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  padding-left: 20px;
  color: #2d2d2d;
  font-weight: 650;
}

.panel-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
}

.review-board {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.role-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.role-option {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  font-weight: 800;
}

.role-option.active {
  color: #fff;
  background: var(--blue);
}

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

.review-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  padding: 14px;
}

.review-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
}

.review-item p {
  margin: 0;
  color: var(--muted);
}

.review-actions {
  display: flex;
  gap: 8px;
}

.mini-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.mini-button.approve {
  border-color: var(--green-border);
  color: var(--green);
  background: var(--green-bg);
}

.add-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow);
}

.add-dialog::backdrop {
  background: rgba(21, 21, 21, 0.35);
}

.add-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.dialog-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
}

.dialog-head p {
  margin: 0;
  color: var(--muted);
}

.close-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 26px;
  line-height: 1;
}

.choice-row {
  display: flex;
  gap: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.choice {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}

.choice.active {
  color: #fff;
  background: var(--blue);
}

.form-hint {
  margin: 0;
  border: 1px solid var(--soft-line);
  border-radius: 9px;
  padding: 12px 14px;
  background: #fbfaf7;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid label,
.add-form > label {
  display: grid;
  gap: 7px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 18px;
  height: 18px;
}

.submit-button {
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  max-width: min(560px, calc(100vw - 32px));
  transform: translate(-50%, 140%);
  border-radius: 10px;
  padding: 14px 18px;
  background: #151515;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .public-nav,
  .public-nav nav,
  .contact-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .storefront .public-main {
    padding: 0 0 48px;
  }

  .hero-section,
  .info-grid,
  .feature-band,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding: 44px 18px 54px;
    background-position: center right;
  }

  .temple-hero {
    background:
      linear-gradient(180deg, rgba(21, 15, 12, 0.86) 0%, rgba(62, 29, 18, 0.68) 58%, rgba(21, 15, 12, 0.5) 100%),
      url("assets/kalika-temple-hero-optimized.jpg") center / cover;
  }

  .info-grid,
  .feature-band,
  .contact-strip {
    width: calc(100% - 36px);
  }

  .hero-emblem {
    min-height: auto;
    justify-self: start;
    margin-top: 8px;
  }

  .hero-emblem img {
    width: clamp(108px, 34vw, 150px);
    max-width: 150px;
    max-height: 150px;
  }

  .site-header {
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px 22px 24px;
  }

  .site-logo {
    width: 64px;
    height: 64px;
  }

  .site-header p {
    font-size: 21px;
  }

  .tabs {
    gap: 10px;
    overflow-x: auto;
    padding: 24px 22px 0;
  }

  .tab {
    min-width: 168px;
    font-size: 21px;
  }

  main {
    padding: 36px 18px 64px;
  }

  .tree-wrap {
    width: 100%;
  }

  .paths-wrap {
    width: 100%;
  }

  .tree-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tree-actions {
    justify-items: start;
  }

  .access-layout {
    grid-template-columns: 1fr;
  }

  .review-head,
  .review-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
  }

  .site-logo {
    width: 56px;
    height: 56px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .site-header h1 {
    font-size: 29px;
  }

  .site-header p {
    font-size: 18px;
  }

  .legend {
    gap: 16px;
    font-size: 17px;
  }

  .paths-wrap {
    height: 640px;
  }

  .path-lines {
    width: 820px;
  }

  .path-card {
    left: 470px;
    width: 540px;
  }

  .path-card.profile {
    width: 360px;
  }

  .path-card h2 {
    font-size: 22px;
  }

  .path-card p,
  .path-note,
  .path-label {
    font-size: 19px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
