/* Mobile first: base styles target small screens */
:root {
  --bg: #f7f4ee;
  --card: #fffdf9;
  --ink: #1f1d1a;
  --muted: #6b655c;
  --line: #e4ddd0;
  --accent: #1f3a2f;
  --accent-hover: #2c5142;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 48px 16px;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 960px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.rule {
  width: 48px;
  height: 1px;
  margin: 20px auto;
  background: var(--accent);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Card: grade, title, message, then button, stacked */
.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.2;
}

.card .message {
  margin: 12px 0 24px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.card a {
  display: block;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.card a:hover,
.card a:focus-visible {
  background: var(--accent-hover);
}

/* Tablets and up: button sizes to its text, aligned left under the message */
@media (min-width: 640px) {
  body {
    padding: 80px 24px;
  }

  header {
    margin-bottom: 56px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .list {
    gap: 20px;
  }

  .card {
    align-items: flex-start;
    padding: 32px;
  }

  .card .message {
    max-width: 65ch;
  }

  .card a {
    padding: 14px 32px;
  }
}

/* Big screens: wider container, larger everything */
@media (min-width: 1200px) {
  main {
    max-width: 1200px;
  }

  h1 {
    font-size: 4.25rem;
  }

  .list {
    gap: 24px;
  }

  .card {
    padding: 44px 48px;
  }

  .label {
    font-size: 0.8125rem;
  }

  .card h2 {
    font-size: 2.25rem;
  }

  .card .message {
    margin: 16px 0 32px;
    font-size: 1.0625rem;
    max-width: 72ch;
  }

  .card a {
    padding: 18px 40px;
    font-size: 0.875rem;
  }
}
