:root {
  --ink: #1c252f;
  --paper: #fffdfa;
  --sun: #ffca69;
  --teal: #0e837f;
  --coral: #e76f51;
  --mist: #f4efe6;
  --line: #d7d0c4;
  --card: #fffaf1;
  --ok: #2a9d8f;
  --warn: #d96b3b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 15% 10%, #ffeec6 0%, #fff8ec 35%, #fffdfa 70%);
  color: var(--ink);
  font-family: "Syne", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(45px);
  opacity: 0.42;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-1 {
  width: 340px;
  height: 340px;
  top: -40px;
  right: -100px;
  background: #ffc96f;
}

.bg-glow-2 {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: 8%;
  background: #8ed7cf;
}

.site-header,
main,
.site-footer {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.site-header {
  margin-top: 1.1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 253, 250, 0.86);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.site-header nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.site-header nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.site-header nav a:hover {
  background: #f4ecdb;
  transform: translateY(-1px);
}

.hero {
  margin-top: 2rem;
  border: 2px solid var(--line);
  border-radius: 1.4rem;
  background: linear-gradient(120deg, #fff7e6 0%, #fffcf7 48%, #f2fbf9 100%);
  padding: clamp(1.4rem, 3vw, 2.25rem);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 1.4px;
  color: var(--teal);
  margin: 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
}

h1,
.hero h2,
.panel h2,
.site-footer strong {
  font-family: "Fraunces", Georgia, serif;
}

.hero h1 {
  margin: 0.55rem 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.hero-copy {
  max-width: 70ch;
  margin: 0;
  color: #34495a;
}

.hero-stats {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-stats article {
  border: 1.5px solid #dbcdb5;
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: #7a3f16;
}

.hero-stats p {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
}

.ad-band {
  margin-top: 1.25rem;
}

.ad-band p {
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  color: #5a6b77;
}

.ad-slot {
  border: 2px dashed #bfbaac;
  border-radius: 0.8rem;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  background: #fffcf4;
  color: #6a5a43;
  text-align: center;
  padding: 0.75rem;
}

.ad-unit {
  width: 100%;
  min-height: 90px;
}

.ad-note {
  margin: 0;
  font-size: 0.72rem;
  color: #6a5a43;
}

body.ads-ready .ad-note {
  display: none;
}

.panel {
  margin-top: 1.25rem;
  border: 2px solid var(--line);
  border-radius: 1.2rem;
  background: var(--card);
  padding: 1.15rem;
}

.panel-head p {
  margin-top: 0;
  color: #425564;
}

.input-explain {
  border: 1.5px solid #dac8ac;
  border-radius: 0.85rem;
  background: #fff9ee;
  padding: 0.85rem;
  margin-bottom: 0.9rem;
}

.input-explain h3 {
  margin-bottom: 0.35rem;
}

.input-explain p {
  margin-top: 0;
  color: #3f5668;
}

.input-explain ul {
  margin: 0;
  padding-left: 1.15rem;
}

.input-explain li {
  margin-bottom: 0.3rem;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-section-title {
  grid-column: 1 / -1;
  margin: 0.2rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  color: #294558;
  border-top: 1px solid #dfd2bd;
  padding-top: 0.65rem;
}

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.95rem;
}

.helper-text {
  font-size: 0.8rem;
  color: #5a6d7c;
  line-height: 1.25;
}

.grid-form input {
  border: 1.8px solid #cfbea3;
  background: #fffef9;
  color: var(--ink);
  border-radius: 0.65rem;
  padding: 0.67rem 0.7rem;
  font-size: 1rem;
}

.grid-form input.money-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.grid-form select {
  border: 1.8px solid #cfbea3;
  background: #fffef9;
  color: var(--ink);
  border-radius: 0.65rem;
  padding: 0.67rem 0.7rem;
  font-size: 1rem;
}

.grid-form input:focus {
  outline: 2px solid #ffc464;
  outline-offset: 1px;
}

.grid-form select:focus {
  outline: 2px solid #ffc464;
  outline-offset: 1px;
}

.combo-box {
  grid-column: 1 / -1;
  border: 1.5px dashed #ceb899;
  border-radius: 0.75rem;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.combo-box legend {
  padding: 0 0.3rem;
  font-weight: 600;
}

.combo-box .checkbox-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #dfd2bd;
  border-radius: 0.5rem;
  padding: 0.45rem;
  background: #fffdf7;
}

.combo-explain {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #dacdb8;
  border-radius: 0.65rem;
  background: #fffdf7;
  color: #314a5b;
  padding: 0.6rem 0.7rem;
}

.one-time-box {
  grid-column: 1 / -1;
  border: 1.5px dashed #ceb899;
  border-radius: 0.75rem;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  background: #fffdf8;
}

.one-time-box legend {
  padding: 0 0.3rem;
  font-weight: 600;
}

.checkbox-wrap {
  justify-content: center;
  flex-direction: column !important;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px dashed #ceb899;
  border-radius: 0.75rem;
  padding: 0.6rem;
  text-align: center;
}

.checkbox-wrap input {
  margin-right: 0.2rem;
}

.form-actions {
  display: flex;
  gap: 0.7rem;
  align-items: end;
}

button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0.72rem 1.2rem;
  background: linear-gradient(105deg, #ef9a47, #d95f3c);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

button.ghost {
  background: #f2ead8;
  color: #2d3f4f;
}

.results {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.results article {
  border: 1.5px solid #d8ccb8;
  border-radius: 0.9rem;
  background: #fffdf7;
  padding: 0.9rem;
}

.results p {
  margin: 0;
  color: #2f4657;
}

.recommend-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommend-grid article {
  border: 1.5px solid #d8c7ac;
  border-radius: 0.85rem;
  padding: 0.8rem;
  background: #fffdf6;
}

.recommend-grid .rank {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: #366175;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid #dfd2bf;
  text-align: left;
  padding: 0.62rem;
  font-size: 0.93rem;
}

thead {
  background: #f8efdf;
}

tbody tr:hover {
  background: #fff7e7;
}

canvas {
  width: 100%;
  height: auto;
  border: 1.5px solid #ddcfba;
  border-radius: 0.9rem;
  background: #fffefb;
}

.cards-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-grid article {
  border: 1.5px solid #d5cbbd;
  border-radius: 0.8rem;
  padding: 0.84rem;
  background: #fffef9;
}

.cards-grid p {
  margin-bottom: 0;
  color: #40596c;
}

.guide-links a {
  font-weight: 700;
  color: #8b3f1f;
}

.checklist {
  margin: 0;
  padding-left: 1.2rem;
}

.checklist li {
  margin-bottom: 0.45rem;
}

details {
  border: 1.5px solid #ddcfbe;
  border-radius: 0.8rem;
  padding: 0.72rem 0.9rem;
  margin-bottom: 0.7rem;
  background: #fffef8;
}

details summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin-bottom: 0;
  color: #445a69;
}

.site-footer {
  margin-top: 1.5rem;
  margin-bottom: 1.6rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  background: #f6efe1;
  padding: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.65s ease forwards;
}

.stagger-1 {
  animation-delay: 0.08s;
}

.stagger-2 {
  animation-delay: 0.16s;
}

.stagger-3 {
  animation-delay: 0.24s;
}

.stagger-4 {
  animation-delay: 0.32s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .grid-form,
  .results,
  .cards-grid,
  .recommend-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .combo-box {
    grid-template-columns: 1fr;
  }

  .one-time-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    border-radius: 1.1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-form,
  .results,
  .cards-grid,
  .recommend-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }

}
