:root {
  --page: #090a08;
  --ink: #f3f0e8;
  --muted: #a7ada4;
  --soft: #6f776e;
  --surface: #11140f;
  --surface-2: #151a13;
  --surface-3: #0b0d0a;
  --line: #2a3128;
  --line-strong: #485240;
  --accent: #a9d8aa;
  --accent-hover: #c4efc2;
  --brass: #d7b46f;
  --brass-deep: #9b7740;
  --warn: #ff9a82;
  --focus: rgba(169, 216, 170, 0.2);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 54px 54px,
    var(--page);
  color: var(--ink);
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px);
  opacity: 0.045;
}

.site-header,
.content-shell,
.site-footer {
  position: relative;
  opacity: 0;
  animation: fadein 0.42s ease forwards;
}

.site-header {
  padding: 30px 24px 12px;
}

.brand-stack {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
}

.brand-link {
  display: grid;
  place-items: start center;
  width: clamp(176px, 24vw, 252px);
  height: clamp(112px, 14vw, 150px);
  overflow: hidden;
  line-height: 0;
  text-decoration: none;
  opacity: 0.94;
  transition: opacity 0.18s, transform 0.18s;
}

.brand-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  transform: translateY(clamp(-42px, -4vw, -30px));
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.52));
}

.header-note {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 650;
}

.header-note a,
.footer-sub a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(169, 216, 170, 0.35);
  transition: color 0.18s, border-color 0.18s;
}

.header-note a:hover,
.footer-sub a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.content-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 24px;
  animation-delay: 0.06s;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 76px),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--brass), transparent);
  opacity: 0.85;
}

.panel-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-heading {
  max-width: 520px;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 9px;
  padding: 3px 9px;
  color: var(--brass);
  background: var(--surface-3);
  border: 1px solid rgba(215, 180, 111, 0.28);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
}

h1 {
  color: var(--ink);
  font-size: 1.85rem;
  font-weight: 760;
  letter-spacing: 0;
}

.section-copy {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.94rem;
}

.mode-tabs {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(98px, 1fr));
  gap: 4px;
  width: min(100%, 270px);
  padding: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.35);
}

.mode-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab[aria-selected="true"] {
  background: #20281d;
  border-color: rgba(169, 216, 170, 0.2);
  color: var(--accent);
}

.mode-form {
  position: relative;
  display: grid;
  gap: 14px;
}

.mode-form[hidden] {
  display: none !important;
}

.fields-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

label {
  color: #d8ded4;
  font-size: 0.84rem;
  font-weight: 720;
  letter-spacing: 0;
}

.input-shell {
  display: flex;
  align-items: center;
  min-height: 48px;
  background: #0b0e0a;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: inset 0 1px 14px rgba(0, 0, 0, 0.42);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input-shell:focus-within {
  background: #0d110c;
  border-color: rgba(169, 216, 170, 0.82);
  box-shadow: 0 0 0 4px var(--focus), inset 0 1px 14px rgba(0, 0, 0, 0.42);
}

.path-shell {
  padding-left: 0;
}

.path-prefix {
  color: var(--brass);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.96rem;
  user-select: none;
  padding-left: 13px;
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 11px 12px;
  font-size: 0.96rem;
  font-family: inherit;
  letter-spacing: 0;
}

input::placeholder {
  color: #5f685d;
}

.preview-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  background: #0c0f0b;
  border: 1px dashed var(--line-strong);
  border-left: 2px solid rgba(215, 180, 111, 0.68);
  border-radius: 7px;
}

.preview-label {
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 760;
}

.preview {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.83rem;
  overflow-wrap: anywhere;
  line-height: 1.5;
  transition: color 0.2s;
}

.preview:not(:empty) {
  color: #b8dfb7;
}

.error {
  color: var(--warn);
  font-size: 0.84rem;
  font-weight: 670;
  min-height: 1.2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 46px;
  margin-top: 2px;
  padding: 11px 24px;
  background: var(--brass);
  color: #10120e;
  border: 1px solid var(--brass);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
  font-weight: 780;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.btn:hover {
  background: #ecc987;
  border-color: #ecc987;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36), 0 0 0 4px rgba(215, 180, 111, 0.1);
}

.btn:active,
.btn.is-pressed,
.mode-tab.is-pressed {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-footer {
  padding: 0 24px 34px;
  animation-delay: 0.12s;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 12px;
  text-align: center;
}

.copyright {
  color: var(--soft);
  font-size: 0.88rem;
}

.footer-sub {
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.84rem;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .fields-inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-top: 26px;
  }

  .panel-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .mode-tabs {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand-logo {
    width: 100%;
  }

  .header-note {
    font-size: 0.8rem;
  }

  .content-shell {
    padding: 18px 12px 18px;
  }

  .panel {
    padding: 22px 14px 20px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .preview-box {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .btn {
    width: 100%;
    justify-self: stretch;
  }
}
