* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: #f4f7fb;
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

.hero {
  margin: 0 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #596bda;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.hero > p:not(.eyebrow),
.muted,
.field-hint {
  color: #65718a;
}

.card {
  margin: 20px 0;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid #dce2ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 42, 72, 0.06);
}

.login-card {
  max-width: 520px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

form {
  margin-top: 22px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #33415d;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #bcc7da;
  border-radius: 8px;
  background: #fff;
  color: #172033;
}

input:focus,
select:focus {
  outline: 3px solid rgba(89, 107, 218, 0.2);
  border-color: #596bda;
}

button {
  min-height: 43px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #4054c7;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

button:hover {
  background: #3446ac;
}

.button-secondary {
  margin-top: 0;
  background: #e9edfa;
  color: #3346a9;
}

.button-secondary:hover {
  background: #dce3f8;
}

.field-hint,
.message {
  margin: 13px 0 0;
  font-size: 0.9rem;
}

.message:not(:empty) {
  padding: 10px 12px;
  border-radius: 7px;
  background: #e9f8ef;
  color: #17633d;
}

.message-error {
  background: #fff0f0 !important;
  color: #a3212c !important;
}

.result {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e7f0;
}

.link-box {
  display: flex;
  align-items: end;
  gap: 10px;
}

.link-box label {
  flex: 1;
}

.link-box input {
  background: #f5f7fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.preview {
  display: grid;
  min-height: 56px;
  margin-top: 18px;
  place-items: center start;
  overflow: auto;
  border-radius: 10px;
  background: #f6f8fc;
}

.preview img,
.preview video {
  display: block;
  max-width: 100%;
  max-height: 480px;
  border-radius: 10px;
}

.preview audio {
  width: min(100%, 520px);
}

.preview pre {
  width: 100%;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.warning {
  width: 100%;
  margin: 0;
  padding: 13px 15px;
  border-left: 4px solid #dc8a18;
  background: #fff7e7;
  color: #815000;
}

@media (max-width: 650px) {
  .page-shell {
    width: min(100% - 24px, 980px);
    padding-top: 34px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .section-heading,
  .link-box {
    align-items: stretch;
    flex-direction: column;
  }
  .section-heading .button-secondary,
  .link-box button {
    width: 100%;
  }
}