:root {
  color-scheme: dark;
  --background: #090b10;
  --surface: #11151d;
  --surface-raised: #171c26;
  --border: #2a3140;
  --text: #f4f6f8;
  --muted: #9ca6b7;
  --accent: #ff8a1f;
  --accent-hover: #ff9f45;
  --success: #60d394;
  --danger: #ff7474;
  --focus: rgba(255, 138, 31, 0.25);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 138, 31, 0.13), transparent 32rem),
    var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

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

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

.brand {
  color: var(--text);
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.app-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 29, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.hero {
  padding: clamp(26px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 138, 31, 0.08), transparent 55%), var(--surface-raised);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p:last-child {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.report-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 5vw, 42px);
}

.field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

label {
  font-weight: 800;
}

#character-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #0b0e14;
  color: var(--text);
  line-height: 1.6;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

textarea::placeholder {
  color: #697385;
}

#output-text {
  background: #0e1219;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  background: var(--accent);
  color: #18100a;
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.button-secondary {
  border-color: #d9dee7;
  background: #edf0f5;
  color: #11151d;
}

.button-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.feedback {
  min-height: 24px;
}

.status-message,
.error-message {
  margin: 0;
  font-size: 0.92rem;
}

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

.error-message {
  color: var(--danger);
}

@media (max-width: 600px) {
  .page {
    width: min(100% - 20px, 1040px);
    padding-top: 18px;
  }

  .hero,
  .report-form {
    padding: 22px;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
