
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #20283b;
  background: #f4f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --primary: #4f46e5;
  --primary-hover: #3730a3;
  --muted: #667085;
  --border: #dfe3ee;
  --surface: #ffffff;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 40px 18px;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 10px 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.045em;
}

.intro,
.section-description {
  color: var(--muted);
  line-height: 1.6;
}

.quote-card,
.add-section {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgb(32 40 59 / 6%);
}

.quote-card {
  text-align: center;
}

.quote-mark {
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 0.9;
}

blockquote {
  margin: 12px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.author {
  margin-bottom: 28px;
  color: var(--muted);
  font-weight: 600;
}

button {
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 3px;
}

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

.add-section {
  margin-top: 26px;
}

.add-section h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

label {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}

textarea {
  resize: vertical;
}

#add-quote-btn {
  width: 100%;
  margin-top: 22px;
}

#form-message {
  min-height: 1.5em;
  margin-bottom: 0;
  line-height: 1.5;
}

#form-message.success {
  color: #167647;
}

#form-message.error {
  color: #b42318;
}

footer {
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
