.translator-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(196, 155, 85, 0.12), transparent 34%),
    linear-gradient(180deg, #fbf8ef 0%, #f1e9da 100%);
}

.translator-hero {
  min-height: 300px;
  padding: 42px 7vw 52px;
  background:
    linear-gradient(90deg, rgba(251, 248, 239, 0.96) 0%, rgba(251, 248, 239, 0.72) 47%, rgba(251, 248, 239, 0.18) 100%),
    url("assets/hero-mountains.png") center right / cover;
  border-bottom: 1px solid rgba(32, 56, 47, 0.12);
}

.translator-hero-inner,
.translator-wrap {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.title-row h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  line-height: 0.92;
}

.translator-hero p:not(.breadcrumb) {
  max-width: 760px;
  color: #263d34;
  font-size: 1.1rem;
  line-height: 1.8;
}

.translator-hero .creator-credit {
  display: inline-flex;
  width: fit-content;
  margin: 8px 0 0;
  padding: 8px 12px;
  color: #173329;
  background: rgba(255, 251, 243, 0.76);
  border: 1px solid rgba(140, 99, 48, 0.24);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.breadcrumb {
  margin: 0 0 18px;
  color: #8d6b3a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.beta-pill {
  padding: 7px 13px;
  color: #8a6330;
  border: 1px solid rgba(140, 99, 48, 0.35);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.76);
  font-weight: 800;
}

.translator-wrap {
  display: grid;
  gap: 22px;
  padding: 0 7vw 44px;
  transform: translateY(-34px);
}

.translator-card,
.translator-benefits,
.translator-info,
.review-panel,
.feedback-card {
  border: 1px solid rgba(32, 56, 47, 0.13);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 0 22px 58px rgba(16, 35, 29, 0.08);
}

.translator-card {
  padding: 28px;
}

.translator-panels {
  display: grid;
  grid-template-columns: 1fr 42px 1fr;
  gap: 24px;
  align-items: stretch;
}

.text-panel {
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
}

.panel-head small {
  font-family: Inter, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
}

.panel-head span {
  padding: 5px 9px;
  background: #e8ddca;
  border-radius: 6px;
  color: #6b5735;
  font-size: 0.72rem;
  font-weight: 800;
}

.textarea-shell,
.output-shell {
  position: relative;
  min-height: 148px;
  border: 1px solid rgba(32, 56, 47, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.textarea-shell textarea {
  width: 100%;
  min-height: 148px;
  padding: 18px 50px 18px 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  resize: vertical;
  font: 1.05rem/1.6 Georgia, serif;
}

.output-shell {
  display: grid;
  align-content: start;
  padding: 18px 50px 44px 18px;
}

.output-shell p {
  margin: 0;
  font: 1.08rem/1.65 Georgia, serif;
  white-space: pre-wrap;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #5d665e;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
}

.icon-button:hover {
  background: rgba(196, 155, 85, 0.14);
}

.clear-button,
.copy-button {
  position: absolute;
  right: 10px;
  top: 10px;
}

.speaker-button {
  position: absolute;
  left: 12px;
  bottom: 10px;
}

.copy-button {
  top: auto;
  bottom: 10px;
}

.panel-foot,
.confidence-row {
  margin-top: 10px;
  color: #6a756d;
  font-size: 0.78rem;
}

.confidence-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confidence-meter {
  flex: 1;
  height: 8px;
  overflow: hidden;
  background: #e7ddce;
  border-radius: 999px;
}

.confidence-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8f6b35, #123428);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.swap-divider {
  position: relative;
  display: grid;
  place-items: center;
}

.swap-divider::before {
  content: "";
  position: absolute;
  inset: 0 auto;
  width: 1px;
  background: rgba(32, 56, 47, 0.16);
}

.swap-divider span {
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #10231d;
  background: #fffbf3;
  border: 1px solid rgba(32, 56, 47, 0.16);
  border-radius: 50%;
  font-weight: 800;
}

.translator-actions {
  display: grid;
  grid-template-columns: 150px 1fr 150px 150px;
  gap: 18px;
  margin-top: 18px;
}

.translator-note {
  margin: 12px 0 0;
  color: #6c746d;
  text-align: center;
  font-size: 0.8rem;
}

.translator-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.translator-benefits article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 26px;
  border-right: 1px solid rgba(32, 56, 47, 0.13);
}

.translator-benefits article:last-child {
  border-right: 0;
}

.translator-benefits span {
  grid-row: 1 / span 2;
  color: #9a7138;
  font-size: 2.9rem;
  line-height: 1;
}

.translator-benefits h3,
.translator-benefits p {
  grid-column: 2;
}

.translator-benefits h3,
.translator-info h2,
.feedback-card h2,
.review-panel h2,
.resource-cta h2 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
}

.translator-benefits p,
.translator-info p,
.feedback-card p,
.review-panel p,
.resource-cta p {
  margin: 0;
  color: #374d43;
  line-height: 1.55;
}

.translator-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 22px;
}

.translator-info,
.review-panel,
.feedback-card {
  padding: 28px;
}

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

.compact-head h2 {
  margin: 0;
}

.text-link {
  color: #8a6330;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.example-grid button {
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(32, 56, 47, 0.14);
  border-radius: 8px;
  cursor: pointer;
}

.example-grid strong,
.example-grid span {
  display: block;
}

.example-grid span {
  margin-top: 11px;
  color: #354b41;
}

.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.status-list span,
.analysis-panel span {
  padding: 8px 10px;
  color: #1c352b;
  background: #ede2cf;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.review-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
}

.analysis-panel {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.analysis-panel .alt {
  background: #fff8ea;
  border: 1px solid rgba(196, 155, 85, 0.28);
}

.analysis-panel .miss {
  background: #f4e7e0;
}

.feedback-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  background: rgba(16, 35, 29, 0.95);
  color: #fff7e8;
}

.feedback-card p {
  color: #eadfc9;
}

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

.feedback-card input,
.feedback-card textarea,
.site-footer input {
  width: 100%;
  padding: 14px 16px;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(196, 155, 85, 0.38);
  border-radius: 6px;
  outline: 0;
}

.feedback-card textarea {
  min-height: 92px;
  resize: vertical;
}

#feedbackStatus {
  min-height: 20px;
  font-size: 0.84rem;
}

.resource-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 36px;
  color: #fff8e9;
  background:
    linear-gradient(90deg, rgba(11, 35, 28, 0.96), rgba(11, 35, 28, 0.8)),
    url("assets/research-desk.png") center right / cover;
  border-radius: 8px;
}

.resource-cta h2 {
  font-size: 2rem;
}

.resource-cta p {
  color: #eadfc9;
}

.resource-cta > div:last-child {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 38px;
  padding: 34px 7vw;
  color: #fff8e9;
  background: linear-gradient(90deg, #0a211a, #14352b);
}

.site-footer .brand-logo {
  margin-bottom: 12px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px 28px;
}

.site-footer form {
  display: grid;
  gap: 12px;
}

.site-footer form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.site-footer .contact-emails {
  align-self: start;
  justify-content: flex-start;
}

@media (max-width: 980px) {
  .translator-panels,
  .translator-grid,
  .review-panel,
  .feedback-card,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .swap-divider {
    display: none;
  }

  .translator-actions {
    grid-template-columns: 1fr 1fr;
  }

  .translator-benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .translator-hero {
    min-height: auto;
    padding: 34px 22px 58px;
  }

  .translator-wrap {
    padding: 0 22px 32px;
  }

  .translator-card,
  .translator-info,
  .review-panel,
  .feedback-card {
    padding: 20px;
  }

  .translator-benefits,
  .example-grid,
  .translator-actions {
    grid-template-columns: 1fr;
  }

  .translator-benefits article {
    border-right: 0;
    border-bottom: 1px solid rgba(32, 56, 47, 0.13);
  }

  .translator-benefits article:last-child {
    border-bottom: 0;
  }

  .resource-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .site-footer {
    padding: 30px 22px;
  }
}
