@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Sora:wght@300;400;600;700&display=swap');

:root {
  --bg-1: #f7efe6;
  --bg-2: #f1f7ff;
  --ink: #1b1b1b;
  --muted: #4c4c4c;
  --accent: #ff7848;
  --accent-2: #2f7cf6;
  --accent-3: #23b59c;
  --card: rgba(255, 255, 255, 0.9);
  --stroke: rgba(27, 27, 27, 0.08);
  --shadow: 0 20px 45px rgba(24, 24, 24, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", "Avenir Next", "Futura", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 10% 10%, rgba(255, 225, 199, 0.7), transparent 60%),
    radial-gradient(1000px 700px at 90% 0%, rgba(196, 225, 255, 0.8), transparent 55%),
    linear-gradient(150deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 45% 55% 60% 40% / 50% 40% 60% 50%;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

body::before {
  top: -120px;
  left: -120px;
  background: #ffe4cd;
}

body::after {
  bottom: -140px;
  right: -120px;
  background: #cfe3ff;
}

main {
  position: relative;
  z-index: 1;
  padding: 40px 24px 64px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  animation: fadeUp 0.7s ease;
}

nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 0;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #fffaf2;
  font-size: 18px;
  box-shadow: 0 10px 26px rgba(255, 120, 72, 0.35);
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: center;
  padding: 40px 0 10px;
}

.hero h1 {
  font-family: "Fraunces", "Palatino Linotype", serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.hero p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
}

.hero-card h3 {
  margin-top: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fffaf2;
  box-shadow: 0 12px 24px rgba(255, 120, 72, 0.32);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--stroke);
}

.btn:hover {
  transform: translateY(-2px);
}

.section-title {
  font-size: 1.4rem;
  margin: 32px 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 28px rgba(27, 27, 27, 0.08);
  display: grid;
  gap: 10px;
  animation: rise 0.6s ease both;
  animation-delay: var(--delay, 0s);
}

.card h4 {
  margin: 0 0 6px;
}

.card a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(35, 181, 156, 0.15);
  color: #0f5c4d;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.disclaimer {
  background: rgba(255, 238, 208, 0.85);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 12px;
  color: #5a3a2a;
  margin-top: 18px;
  font-size: 0.95rem;
}

.info-pill {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(207, 231, 255, 0.6);
  color: #214a77;
  font-size: 0.95rem;
  margin-top: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(27, 27, 27, 0.08);
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(27, 27, 27, 0.08);
}

th {
  background: rgba(255, 225, 199, 0.7);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

.quiz-shell {
  display: grid;
  gap: 18px;
}

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

.quiz-meta .tag {
  background: rgba(47, 124, 246, 0.16);
  color: #1f4c99;
}

.quiz-question {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  border: 1px solid var(--stroke);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.quiz-question h4 {
  margin: 0;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.quiz-options label {
  display: block;
  cursor: pointer;
  position: relative;
}

.quiz-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-options input:checked + span {
  border-color: transparent;
  background: rgba(255, 120, 72, 0.15);
  color: #7b341e;
  font-weight: 600;
}

.quiz-options span {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(27, 27, 27, 0.14);
  background: #fff;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.92rem;
}

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

.result {
  padding: 16px;
  border-radius: 14px;
  background: rgba(207, 231, 255, 0.7);
  color: #234b7a;
  display: none;
}

.result.show {
  display: block;
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(27, 27, 27, 0.08);
  overflow: hidden;
}

.progress-bar span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  width: 0;
  transition: width 0.2s ease;
}

footer {
  text-align: center;
  padding: 30px 20px calc(60px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: auto;
}

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

.task-panel {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.task-area {
  border-radius: 16px;
  border: 1px dashed rgba(27, 27, 27, 0.2);
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 12px;
  text-align: center;
}

.task-status {
  font-size: 1.05rem;
  font-weight: 600;
}

.task-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.task-button {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  background: rgba(47, 124, 246, 0.15);
  color: #1f4c99;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 120, 72, 0.25);
}

.task-button:hover {
  transform: translateY(-2px);
}

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

.task-metric {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  border: 1px solid var(--stroke);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.92rem;
}

.task-canvas {
  width: 100%;
  max-width: 520px;
  height: 260px;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(27, 27, 27, 0.12);
  background: #fff;
}

.task-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(27, 27, 27, 0.2);
  font-size: 1rem;
  font-family: inherit;
  width: min(240px, 100%);
  margin: 0 auto;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-options {
    grid-template-columns: 1fr 1fr;
  }
}
