:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #17201c;
  --muted: #65706a;
  --line: #d8ded7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #dff5f0;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(26, 38, 32, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 36%),
    linear-gradient(280deg, rgba(191, 90, 54, 0.12), transparent 34%),
    var(--bg);
  color: var(--ink);
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.status-card {
  display: flex;
  min-width: 188px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aa39d;
}

.status-dot.live {
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.16);
}

.status-dot.error {
  background: var(--danger);
}

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

.controls,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

label,
legend {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

select {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

button[type="submit"] {
  background: var(--accent);
  color: white;
}

button[type="button"] {
  background: #eef1ed;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

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

.panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 560px;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 620px;
  padding: 18px;
  overflow-y: auto;
}

.message {
  width: fit-content;
  max-width: 92%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  line-height: 1.55;
}

.translation .message {
  margin-left: auto;
  border-color: #b9e7dc;
  background: var(--accent-soft);
}

.empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .workspace,
  .panels {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .status-card {
    width: fit-content;
  }

  .panel,
  .panels {
    min-height: auto;
  }

  .log {
    min-height: 300px;
  }
}
