:root {
  --balanced-drift: #aa967d;
  --crystal-grey: #e4e4e4;
  --ivory-clarity: #f2ece0;
  --fortune-light: #eecb6d;
  --golden-ratio: #c59d3e;
  --pure-equity: #ffffff;
  --alpha-black: #000000;
  --bg-deep: #1a140e;
  --bg-card: #221b13;
  --bg-card-hover: #2a2118;
  --line: rgba(170, 150, 125, 0.16);
  --line-strong: rgba(170, 150, 125, 0.26);
  --text: var(--ivory-clarity);
  --muted: rgba(242, 236, 224, 0.58);
  --font-display: "Libre Baskerville", "Iowan Old Style", Georgia, serif;
  --font-body: "DM Sans", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(197, 157, 62, 0.12), transparent 34rem),
    linear-gradient(180deg, #120e0a 0%, var(--bg-deep) 48%, #100c08 100%);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(170, 150, 125, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 150, 125, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

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

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

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  color: var(--golden-ratio);
  background: var(--bg-deep);
  transition: opacity 600ms ease, visibility 600ms ease;
}

.page-loader.done {
  visibility: hidden;
  opacity: 0;
}

.page-loader img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: loaderPulse 1.8s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%,
  100% {
    opacity: 0.36;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.app-shell {
  width: min(1320px, calc(100% - 80px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.brand-mark {
  width: 38.95px;
  height: 38.95px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-wordmark {
  width: 86.1px;
  height: auto;
  flex: 0 0 auto;
  margin-left: -4px;
  object-fit: contain;
  display: block;
}

.intro {
  display: grid;
  align-content: start;
  padding: clamp(24px, 3.2vh, 44px) 0 clamp(36px, 4.4vh, 56px);
  border-bottom: 1px solid var(--line);
}

.intro-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin-bottom: 20px;
  color: var(--golden-ratio);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.intro-line span {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--golden-ratio);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
}

.success-intro {
  align-content: start;
  min-height: calc(100vh - 88px);
  padding-top: clamp(32px, 5vh, 56px);
  border-bottom: 0;
}

.success-intro h1 {
  font-size: clamp(26px, 2.3vw, 32px);
  line-height: 1.2;
}

.success-intro .intro-line {
  margin-bottom: 14px;
  color: rgba(197, 157, 62, 0.82);
  font-size: 15px;
}

.success-intro .intro-line span {
  opacity: 0.72;
}

.return-link {
  width: fit-content;
  margin-top: 24px;
  border-bottom: 1px solid rgba(238, 203, 109, 0.36);
  color: rgba(238, 203, 109, 0.78);
  font-size: 13px;
  font-weight: 500;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 0.7fr);
  align-items: stretch;
  gap: 16px;
  padding: 16px 0;
}

.panel {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(242, 236, 224, 0.035), transparent 44%),
    rgba(34, 27, 19, 0.76);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.sectors {
  display: grid;
  grid-template-rows: auto 1fr;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header-single {
  justify-content: flex-start;
}

.panel-header p,
.panel-header span {
  margin: 0;
  color: var(--balanced-drift);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.panel h2 {
  margin: 0;
  padding: 28px 24px 0;
  font-size: 16px;
  font-weight: 500;
}

.theme-list {
  display: grid;
  align-content: start;
  min-height: 100%;
  padding-bottom: 16px;
}

.theme-item {
  border-bottom: 1px solid var(--line);
}

.theme-item:last-child {
  border-bottom: 0;
}

.theme-item[open],
.theme-item:hover {
  background: rgba(242, 236, 224, 0.035);
}

.theme-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 24px;
  color: rgba(242, 236, 224, 0.86);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  list-style: none;
  outline: none;
  cursor: pointer;
}

.theme-item summary:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(238, 203, 109, 0.45);
}

.theme-item summary::-webkit-details-marker {
  display: none;
}

.theme-item summary::after {
  content: "+";
  color: rgba(170, 150, 125, 0.72);
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

.theme-item[open] summary::after {
  content: "–";
}

.theme-item p {
  max-width: 600px;
  margin: 0;
  padding: 0 56px 22px 24px;
  color: rgba(242, 236, 224, 0.64);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.78;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 22px 24px 16px;
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-form label {
  display: grid;
  gap: 7px;
}

.contact-form label span {
  color: rgba(242, 236, 224, 0.66);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 12, 8, 0.54);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input,
select {
  height: 44px;
  padding: 0 14px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(242, 236, 224, 0.48) 50%),
    linear-gradient(135deg, rgba(242, 236, 224, 0.48) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  padding-right: 40px;
}

select option {
  color: var(--text);
  background: var(--bg-card);
}

textarea {
  min-height: 108px;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(238, 203, 109, 0.7);
  background: rgba(16, 12, 8, 0.68);
  box-shadow: 0 0 0 3px rgba(197, 157, 62, 0.1);
}

::placeholder {
  color: rgba(242, 236, 224, 0.42);
  font-size: 12px;
}

.contact-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 16px;
  border: 1px solid rgba(238, 203, 109, 0.55);
  border-radius: 8px;
  color: var(--fortune-light);
  background: rgba(197, 157, 62, 0.08);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  border-color: rgba(238, 203, 109, 0.72);
  color: var(--fortune-light);
  background: rgba(197, 157, 62, 0.14);
  transform: translateY(-1px);
}

.contact-details {
  display: grid;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: rgba(242, 236, 224, 0.62);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  transition: color 160ms ease;
}

.contact-link svg {
  width: 18px;
  height: 18px;
  color: var(--golden-ratio);
  opacity: 0.78;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--fortune-light);
}

.footer {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 6px;
  min-height: 82px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: rgba(242, 236, 224, 0.42);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.footer-mark {
  width: 35.875px;
  height: 35.875px;
  object-fit: contain;
}

.footer-wordmark {
  width: 82px;
  height: auto;
  margin-left: -4px;
  object-fit: contain;
  display: block;
}

@media (max-width: 860px) {
  h1 {
    font-size: 38px;
  }

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

  .panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 24px);
    padding: 14px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
  }

  .intro {
    min-height: auto;
    padding: clamp(28px, 8vw, 36px) 0 clamp(30px, 9vw, 38px);
  }

  h1 {
    font-size: 27px;
  }

  .workspace {
    gap: 12px;
    padding: 12px 0;
  }

  .panel-header,
  .panel h2,
  .contact-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .contact-details {
    padding-left: 16px;
    padding-right: 16px;
  }

  .theme-item summary {
    padding-left: 16px;
    padding-right: 16px;
  }

  .theme-item p {
    padding-left: 16px;
    padding-right: 40px;
  }

  .footer {
    min-height: 84px;
    padding: 12px 0;
  }
}

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