:root {
  --bg-1: #031a54;
  --bg-2: #ffffff;
  --ink: #07163f;
  --muted: #32466f;
  --card: rgba(255, 255, 255, 0.94);
  --line: rgba(7, 22, 63, 0.2);
  --primary: #bf0a30;
  --primary-strong: #031a54;
  --shadow: 0 14px 30px rgba(3, 26, 84, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lato", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(
      180deg,
      #031a54 0%,
      #031a54 20%,
      #0a2b7d 20%,
      #0a2b7d 48%,
      #ffffff 48%,
      #ffffff 58%,
      #0a2b7d 58%,
      #0a2b7d 80%,
      #031a54 80%,
      #031a54 100%
    );
}

.app-shell {
  width: min(1100px, 92vw);
  margin: 2.2rem auto 3rem;
  display: grid;
  gap: 1.2rem;
}

.hero {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 255, 0.95));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem;
  animation: rise 0.45s ease both;
}

.eyebrow {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin-top: 0.2rem;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.5rem, 4.2vw, 2.2rem);
}

.hero-copy {
  margin: 0.55rem 0 0;
  max-width: 72ch;
  color: var(--muted);
}

.free-note {
  margin: 0.7rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 4px solid var(--primary);
  background: rgba(191, 10, 48, 0.08);
  border-radius: 10px;
  color: var(--primary-strong);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 0.95fr;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
  animation: rise 0.55s ease both;
}

header p {
  color: var(--muted);
  margin: 0.35rem 0 0.85rem;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

input[type="file"] {
  display: none;
}

.upload-button,
button {
  border-radius: 11px;
  border: 1px solid transparent;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.upload-button,
button.primary {
  color: #fff;
  background: var(--primary);
}

button.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
}

.upload-button:hover,
button:hover {
  transform: translateY(-1px);
}

textarea {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  resize: vertical;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: var(--ink);
}

.follow-panel {
  margin-top: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.follow-title {
  margin: 0 0 0.45rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  color: var(--primary-strong);
}

.reading-track {
  min-height: 98px;
  max-height: 190px;
  overflow: auto;
  line-height: 1.7;
  color: var(--muted);
}

.track-word {
  border-radius: 5px;
  padding: 0 0.08rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.track-word.active-word {
  background: #bf0a30;
  color: #ffffff;
}

.summary-panel {
  margin-top: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.simple-summary {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.6;
}

.simple-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.simple-summary li {
  margin: 0.2rem 0;
}

.action-row,
.transport {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.control {
  margin-top: 0.75rem;
}

.control label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.status {
  color: var(--muted);
  font-size: 0.92rem;
}

.impact-grid {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.impact-grid p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.story-grid {
  margin-top: 0.3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.story-grid p {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.privacy-panel p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.consent-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(420px, calc(100vw - 2rem));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.85rem;
  z-index: 1000;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner p {
  margin: 0;
  color: var(--muted);
}

.consent-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.creator-name {
  margin-top: 0.45rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--primary-strong);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  textarea {
    min-height: 210px;
  }
}
