:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #627080;
  --line: #d8e0e7;
  --panel: #ffffff;
  --page: #f4f7f9;
  --accent: #d92525;
  --accent-dark: #ad1c1c;
  --blue: #246b9f;
  --green: #1d7a5d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(217, 37, 37, 0.08), rgba(36, 107, 159, 0.08)),
    var(--page);
}

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

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.86rem;
  letter-spacing: 0;
}

.site-brand:hover {
  color: var(--accent-dark);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 22px;
  align-items: stretch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(23, 33, 43, 0.08);
}

.intro {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
  border-top: 5px solid var(--accent);
}

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

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 7ch;
}

.summary {
  margin: 26px 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

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

.stats-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 86px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.stats-grid strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
}

.form-panel {
  padding: 34px;
  display: grid;
  gap: 24px;
  align-content: center;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.88rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 107, 159, 0.14);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
}


.channel-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.channel-preview[hidden],
.progress-panel[hidden] {
  display: none;
}

.avatar-wrap {
  width: 58px;
  height: 58px;
}

.channel-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.channel-avatar {
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
}

.channel-avatar.is-empty {
  background: #eef2f6;
}

.channel-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
}

.channel-copy strong,
.channel-copy span,
.channel-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-copy strong {
  font-size: 1.08rem;
  white-space: nowrap;
}

.channel-copy span {
  color: var(--blue);
  font-size: 0.86rem;
  white-space: nowrap;
}

.channel-copy p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.progress-panel {
  display: grid;
  gap: 9px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-head strong {
  color: var(--ink);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 320ms ease;
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status.error {
  color: var(--accent-dark);
}

.status.success {
  color: var(--green);
}

@media (max-width: 520px) {
  .channel-preview {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 86px;
    padding: 12px;
  }

  .avatar-wrap,
  .channel-avatar {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 24px, 640px);
    padding: 24px 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
  }

  h1 {
    max-width: 8ch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

