:root {
  color-scheme: light;
  --charcoal: #1a1d20;
  --gold: #c8a15a;
  --teal: #0e6b6b;
  --warm-white: #faf8f5;
  --soft-gray: #e6e6e6;
  --white: #ffffff;
  --ink-muted: #5f6468;
  --line: rgba(26, 29, 32, 0.14);
  --shadow: 0 20px 50px rgba(26, 29, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(250, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand-lockup,
.site-nav,
.domain-link,
.hero-actions,
.action-row,
.result-header,
.principle {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.site-nav {
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  background: var(--white);
}

.site-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  background: var(--charcoal);
  color: var(--warm-white);
}

.domain-link {
  justify-content: flex-end;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.hero-section {
  position: relative;
  min-height: calc(78vh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 64px clamp(22px, 8vw, 108px);
  background:
    linear-gradient(90deg, rgba(26, 29, 32, 0.96), rgba(26, 29, 32, 0.82)),
    var(--charcoal);
  color: var(--warm-white);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.hero-watermark {
  position: absolute;
  right: clamp(-60px, 5vw, 80px);
  width: min(42vw, 520px);
  max-width: 72%;
  opacity: 0.23;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.36));
}

.hero-copy {
  position: relative;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1,
h2 {
  font-family: Cinzel, Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

h3 {
  font-size: 1.3rem;
}

.hero-text,
.page-title-block p,
.about-hero p,
.brand-values p {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-text {
  max-width: 550px;
  color: rgba(250, 248, 245, 0.78);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions,
.action-row {
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.ghost-action,
.download-grid a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  background: var(--gold);
  color: var(--charcoal);
}

.primary-action:hover {
  background: #d7b574;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost-action {
  background: transparent;
  border-color: rgba(200, 161, 90, 0.72);
  color: var(--gold);
}

.trust-strip {
  width: min(1120px, calc(100vw - 34px));
  margin: -34px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.principle {
  min-height: 86px;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  color: var(--charcoal);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.line-icon {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-block;
  color: var(--gold);
}

.line-icon-lock::before {
  content: "";
  position: absolute;
  inset: 10px 6px 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.line-icon-lock::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 10px;
  height: 13px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.line-icon-note::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 1px;
  width: 3px;
  height: 20px;
  background: currentColor;
}

.line-icon-note::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 13px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.line-icon-gem::before {
  content: "";
  position: absolute;
  inset: 4px 2px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.line-icon-circle::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.workspace-section,
.page-shell {
  width: min(1180px, calc(100vw - 34px));
  margin: 0 auto;
}

.workspace-section {
  padding: 76px 0 68px;
}

.page-shell {
  padding: 54px 0 70px;
}

.section-heading,
.page-title-block {
  max-width: 760px;
  margin-bottom: 24px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.78fr);
  gap: 20px;
  align-items: stretch;
}

.decode-grid {
  align-items: start;
}

.tool-panel,
.result-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 24px;
}

.result-panel {
  min-height: 360px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-header {
  justify-content: space-between;
  gap: 16px;
}

form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span,
.toggle-field span {
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

textarea,
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm-white);
  color: var(--charcoal);
  outline: none;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 161, 90, 0.26);
}

textarea {
  min-height: 210px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

input[type="file"] {
  padding: 10px 12px;
}

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

.toggle-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm-white);
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.status-pill {
  flex: 0 0 auto;
  color: var(--teal);
  background: rgba(14, 107, 107, 0.08);
  border: 1px solid rgba(14, 107, 107, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 800;
}

audio {
  width: 100%;
}

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

.download-grid a {
  color: var(--charcoal);
  background: rgba(200, 161, 90, 0.14);
  border-color: rgba(200, 161, 90, 0.45);
}

.download-grid a:first-child {
  color: var(--warm-white);
  background: var(--teal);
  border-color: var(--teal);
}

.download-grid:empty::before {
  content: "Generated files will appear here.";
  grid-column: 1 / -1;
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
}

.message-output {
  flex: 1;
  min-height: 260px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(22px, 5vw, 46px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about-logo {
  width: 100%;
  max-width: 470px;
  border-radius: 8px;
}

.brand-values {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.brand-values article {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-values .line-icon {
  margin-bottom: 18px;
}

.brand-values h2 {
  font-size: 1.5rem;
}

.manual-shell {
  width: min(1240px, calc(100vw - 34px));
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.56fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  margin-bottom: 22px;
  padding: clamp(22px, 5vw, 44px);
  background:
    radial-gradient(circle at 86% 20%, rgba(200, 161, 90, 0.13), transparent 34%),
    var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.manual-hero p {
  max-width: 760px;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.manual-logo {
  width: 100%;
  max-width: 420px;
  justify-self: end;
  border-radius: 8px;
}

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

.manual-card {
  min-width: 0;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(26, 29, 32, 0.06);
}

.manual-wide {
  grid-column: 1 / -1;
}

.manual-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.manual-card p,
.manual-card li,
.manual-card dd,
.parameter-table span {
  color: var(--ink-muted);
  line-height: 1.55;
}

.manual-list {
  margin: 0;
  padding-left: 1.2rem;
}

.manual-list li + li {
  margin-top: 7px;
}

.manual-definitions {
  margin: 0;
}

.manual-definitions dt {
  margin-top: 14px;
  color: var(--charcoal);
  font-weight: 850;
}

.manual-definitions dt:first-child {
  margin-top: 0;
}

.manual-definitions dd {
  margin: 4px 0 0;
}

.parameter-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.parameter-table > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(180px, 0.9fr) minmax(260px, 1.4fr);
  background: var(--white);
}

.parameter-table > div:first-child {
  background: var(--charcoal);
}

.parameter-table > div:first-child span {
  color: var(--warm-white);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.parameter-table span {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.parameter-table span:last-child {
  border-right: 0;
}

.site-footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 4vw, 52px);
  color: rgba(250, 248, 245, 0.72);
  background: var(--charcoal);
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .domain-link {
    justify-content: center;
  }

  .hero-section {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 76px;
  }

  .hero-watermark {
    right: -80px;
    width: 420px;
  }

  .trust-strip,
  .workspace-grid,
  .about-hero,
  .brand-values,
  .manual-hero,
  .manual-grid {
    grid-template-columns: 1fr;
  }

  .manual-logo {
    justify-self: start;
  }

  .manual-wide {
    grid-column: auto;
  }

  .parameter-table,
  .parameter-table > div,
  .parameter-table span {
    display: block;
  }

  .parameter-table > div:first-child {
    display: none;
  }

  .parameter-table > div {
    padding: 12px 0;
  }

  .parameter-table span {
    border-right: 0;
    padding: 4px 14px;
  }

  .parameter-table span:first-child {
    color: var(--charcoal);
    font-weight: 850;
  }

  .options-grid,
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
    padding: 12px;
  }

  .brand-lockup {
    text-align: center;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .hero-section {
    padding: 42px 18px 64px;
  }

  .hero-watermark {
    width: 330px;
    opacity: 0.16;
  }

  .trust-strip,
  .workspace-section,
  .page-shell {
    width: min(100vw - 20px, 1180px);
  }

  .tool-panel,
  .result-panel,
  .about-hero,
  .brand-values article,
  .manual-hero,
  .manual-card {
    padding: 16px;
  }

  .hero-actions,
  .action-row,
  .result-header,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .ghost-action,
  .status-pill {
    width: 100%;
    text-align: center;
  }

  .options-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }
}
