:root {
  --poly-primary: #ff7a18;
  --poly-secondary: #ff6b00;
  --poly-primary-alpha: rgba(255, 122, 24, 0.28);
  --talk-primary: #1e88e5;
  --talk-primary-alpha: rgba(30, 136, 229, 0.16);
  --talk-secondary: #0d47a1;
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-soft: #1d2b52;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --premium-card-border: rgba(30, 136, 229, 0.26);
  --premium-card-bg-start: rgba(13, 24, 51, 0.64);
  --premium-card-bg-end: rgba(24, 38, 76, 0.46);
  --premium-card-highlight: rgba(30, 136, 229, 0.16);
  --premium-option-border: rgba(255, 255, 255, 0.08);
  --premium-option-bg: rgba(255, 255, 255, 0.035);
  --premium-option-text: #e9f1ff;
  --conv-source-color: #1e88e5;
  --conv-source-bg: rgba(30, 136, 229, 0.08);
  --conv-source-text: #c2e0ff;
  --conv-source-segment-text: #b9dcff;
  --conv-source-glow: rgba(30, 136, 229, 0.28);
  --conv-target-color: #ff7a18;
  --conv-target-bg: rgba(255, 122, 24, 0.09);
  --conv-target-text: #ffd2a3;
  --conv-target-glow: rgba(255, 122, 24, 0.3);
  --max-lang-label-width: 112px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 122, 24, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(30, 136, 229, 0.18), transparent 28%),
    var(--bg-dark);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 167, 38, 0.92);
  outline-offset: 3px;
}

.enterprise-frame {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.hero-header {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-home-link {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.brand-home-link:focus-visible {
  outline: 2px solid rgba(255, 122, 24, 0.75);
  outline-offset: 6px;
  border-radius: 12px;
}

.app-logo {
  height: 112px;
  width: auto;
  filter: drop-shadow(0 4px 20px rgba(255, 122, 24, 0.3));
}

.edition-pill {
  margin-top: -8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--poly-primary), var(--talk-primary));
  color: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 20px rgba(255, 122, 24, 0.35);
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
}

.beta-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: fit-content;
  border: 1px solid rgba(255, 167, 38, 0.28);
  border-radius: 999px;
  background: rgba(13, 24, 51, 0.56);
  color: #dfe7f5;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.beta-notice strong {
  color: #ffd08a;
  font-weight: 900;
  text-transform: uppercase;
}

.beta-notice span {
  color: #c5d0e5;
  min-width: 0;
  overflow-wrap: anywhere;
}


.section-kicker {
  display: block;
  color: var(--poly-primary);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 6px;
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 34px; }
h2 { font-size: 20px; }

select {
  width: 100%;
  border: 2px solid rgba(255, 122, 24, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(30, 136, 229, 0.1)),
    rgba(22, 33, 62, 0.86);
  color: white;
  outline: none;
  scrollbar-color: rgba(255, 122, 24, 0.78) rgba(13, 24, 51, 0.82);
  scrollbar-width: thin;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select:hover {
  border-color: rgba(30, 136, 229, 0.56);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.08);
}

select:focus {
  border-color: var(--poly-primary);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14), 0 0 24px rgba(30, 136, 229, 0.16);
}

select::-webkit-scrollbar { width: 9px; }
select::-webkit-scrollbar-track { background: rgba(13, 24, 51, 0.82); border-radius: 999px; }
select::-webkit-scrollbar-thumb {
  border: 2px solid rgba(13, 24, 51, 0.82);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--poly-primary), var(--talk-primary));
}
select::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff9a3d, #45a3ff); }

select:disabled { opacity: 0.58; cursor: not-allowed; }
option { background: #101b3a; color: #fff; }
option:checked { background: linear-gradient(135deg, rgba(255, 122, 24, 0.9), rgba(30, 136, 229, 0.9)); }
option:disabled { color: #6f7890; }



.language-flag-icon {
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 1px 3px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
  height: 14px;
  object-fit: cover;
  width: 21px;
}

.language-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#source-label,
#target-label {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.language-pair-label {
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.language-pair-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-left: 3px solid var(--language-pair-color);
  border-radius: 6px;
  padding: 2px 7px 2px 6px;
  font-size: 12px;
  background: var(--language-pair-bg);
  color: var(--language-pair-text);
}

.language-pair-item-source {
  --language-pair-color: var(--conv-source-color);
  --language-pair-bg: var(--conv-source-bg);
  --language-pair-text: var(--conv-source-text);
}

.language-pair-item-target {
  --language-pair-color: var(--conv-target-color);
  --language-pair-bg: var(--conv-target-bg);
  --language-pair-text: var(--conv-target-text);
}

.language-pair-item .language-label-text {
  max-width: var(--max-lang-label-width);
}

.language-pair-divider {
  color: #9fa9bd;
  font-size: 11px;
  font-weight: 900;
}

.custom-language-select {
  min-width: 0;
  position: relative;
  width: 100%;
}

.custom-language-select .native-language-select {
  height: 1px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 1px;
}

.custom-language-select-button {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(30, 136, 229, 0.1)),
    rgba(22, 33, 62, 0.86);
  border: 2px solid rgba(255, 122, 24, 0.3);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  justify-content: flex-start;
  min-height: 50px;
  min-width: 0;
  overflow: hidden;
  padding: 12px 14px;
  text-align: left;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  width: 100%;
}

.custom-language-select-button::after {
  color: #dfe7f5;
  content: "⌄";
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  margin-left: auto;
}

.custom-language-select-button:hover {
  border-color: rgba(30, 136, 229, 0.56);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.08);
}

.custom-language-select.is-disabled .custom-language-select-button,
.custom-language-select-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.custom-language-select.is-disabled .custom-language-select-button:hover,
.custom-language-select-button:disabled:hover {
  border-color: rgba(255, 122, 24, 0.3);
  box-shadow: none;
}

.custom-language-select.is-disabled .custom-language-select-list {
  display: none;
}

.custom-language-select.is-open .custom-language-select-button,
.custom-language-select-button:focus-visible {
  border-color: var(--poly-primary);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14), 0 0 24px rgba(30, 136, 229, 0.16);
  outline: none;
}

.custom-language-select-list {
  background: #0d1833;
  border: 1px solid rgba(30, 136, 229, 0.42);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 122, 24, 0.14);
  display: none;
  left: 0;
  max-height: 326px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  scrollbar-color: rgba(255, 122, 24, 0.86) rgba(13, 24, 51, 0.9);
  scrollbar-width: thin;
  top: calc(100% + 6px);
  z-index: 80;
}

.custom-language-select.is-open .custom-language-select-list { display: grid; }

.custom-language-select-list::-webkit-scrollbar { width: 9px; }
.custom-language-select-list::-webkit-scrollbar-track { background: rgba(13, 24, 51, 0.9); border-radius: 999px; }
.custom-language-select-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(13, 24, 51, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--poly-primary), var(--talk-primary));
}
.custom-language-select-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff9a3d, #45a3ff); }

.custom-language-select-option.is-selected {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.32), rgba(30, 136, 229, 0.46));
}

.custom-language-select-source .custom-language-select-button {
  border-color: rgba(30, 136, 229, 0.42);
}

.custom-language-select-source .custom-language-select-list {
  border-color: rgba(30, 136, 229, 0.5);
  scrollbar-color: rgba(30, 136, 229, 0.86) rgba(13, 24, 51, 0.9);
}

.custom-language-select-source .custom-language-select-list::-webkit-scrollbar-thumb {
  background: rgba(30, 136, 229, 0.86);
}

.custom-language-select-source .custom-language-select-list::-webkit-scrollbar-thumb:hover {
  background: #45a3ff;
}

.custom-language-select-source .custom-language-select-option.is-selected {
  background: rgba(30, 136, 229, 0.44);
}

.custom-language-select-target .custom-language-select-button {
  border-color: rgba(255, 122, 24, 0.42);
}

.custom-language-select-target .custom-language-select-list {
  border-color: rgba(255, 122, 24, 0.5);
  scrollbar-color: rgba(255, 122, 24, 0.86) rgba(13, 24, 51, 0.9);
}

.custom-language-select-target .custom-language-select-list::-webkit-scrollbar-thumb {
  background: rgba(255, 122, 24, 0.86);
}

.custom-language-select-target .custom-language-select-list::-webkit-scrollbar-thumb:hover {
  background: #ff9a3d;
}

.custom-language-select-target .custom-language-select-option.is-selected {
  background: rgba(255, 122, 24, 0.38);
}

.custom-language-select-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #f5fbff;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.custom-language-select-option:hover,
.custom-language-select-option:focus-visible {
  background: rgba(30, 136, 229, 0.22);
  outline: none;
}

.custom-language-select-option:disabled {
  color: #6f7890;
  cursor: not-allowed;
}
