:root {
  --navy: #1f2d4d;
  --teal: #2b7a78;
  --bg: #f7f8fa;
  --border: #dde1e7;
  --text: #26303d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.page-header {
  background: var(--navy);
  color: white;
  padding: 32px 24px;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.page-header p {
  margin: 0;
  opacity: 0.85;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.choice-screen h2 {
  text-align: center;
  color: var(--navy);
  margin: 0 0 20px;
  font-size: 1.3rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  color: var(--text);
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -12px rgba(31, 45, 77, 0.35);
  outline: none;
}

.choice-icon {
  font-size: 2.4rem;
}

.choice-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}

.choice-desc {
  color: #6b7280;
  font-size: 0.88rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.generator-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

select {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: white;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
}

.generator-form button[type="submit"] {
  background: var(--teal);
  color: white;
}

.generator-form button[type="submit"]:hover {
  background: #226361;
}

.print-btn {
  display: block;
  margin: 20px 0 0 auto;
  background: white;
  border: 1px solid var(--teal);
  color: var(--teal);
}

.print-btn:hover {
  background: #eaf5f4;
}

.hidden {
  display: none !important;
}

.guide-output {
  margin-top: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

.guide-header h1 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.5rem;
}

.guide-header p {
  margin: 0 0 24px;
  color: #6b7280;
  font-weight: 600;
}

.guide-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.guide-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.guide-section h2 {
  color: var(--teal);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.atlas-group {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.atlas-group:first-of-type {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.atlas-group h3 {
  color: var(--navy);
  font-size: 1.02rem;
  margin: 0 0 4px;
}

.atlas-group .group-intro {
  color: #4b5563;
  font-style: italic;
  margin: 0 0 10px;
}

.atlas-group ul {
  margin: 0;
  padding-left: 20px;
}

.atlas-group ul li {
  margin-bottom: 8px;
  color: var(--text);
}

.standard-tag {
  display: inline-block;
  background: #eaf5f4;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.focus {
  color: #4b5563;
  font-style: italic;
  margin-bottom: 16px;
}

.quarters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.quarter {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.quarter h4 {
  margin: 0 0 6px;
  color: var(--navy);
}

.quarter ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
}

.caveat {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.std-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-left: 6px;
  white-space: nowrap;
}

.std-link:hover {
  text-decoration: underline;
}

.quarter-link {
  display: block;
  margin: 10px 0 0;
}

.vera-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.vera-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.vera-tab:hover,
.vera-tab:focus-visible {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -12px rgba(31, 45, 77, 0.35);
  outline: none;
}

.vera-tab-icon {
  font-size: 1.8rem;
}

.vera-tab-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 6px 0;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

@media print {
  .page-header,
  .choice-screen,
  .back-link,
  .generator-form,
  .print-btn {
    display: none !important;
  }

  .guide-output {
    border: none;
    padding: 0;
  }
}
