@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --background: #fcfaf7;
  --foreground: #262630;
  --muted: #f2f0ec;
  --muted-foreground: #6f7280;
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --border: rgba(38, 38, 48, 0.1);
  --primary: #e43c53;
  --primary-dark: #c43045;
  --primary-soft: rgba(228, 60, 83, 0.1);
  --accent: #fff2da;
  --success-soft: #eefbf4;
  --success-border: #cfead9;
  --success-text: #20724a;
  --shadow-sm: 0 10px 30px rgba(20, 24, 35, 0.05);
  --shadow-md: 0 22px 60px rgba(20, 24, 35, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--foreground);
  background:
    radial-gradient(circle at top right, rgba(228, 60, 83, 0.08), transparent 30%),
    radial-gradient(circle at top left, rgba(255, 211, 128, 0.12), transparent 28%),
    var(--background);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
canvas {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(1040px, 100%);
}

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

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: var(--foreground);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 999px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  line-height: 1.1;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(38, 38, 48, 0.08);
  background: rgba(252, 250, 247, 0.82);
  backdrop-filter: blur(14px);
}

.app-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

.brand-text {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.app-nav ul {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-nav a {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.app-nav a:hover,
.app-nav a.active {
  color: var(--foreground);
}

.nav-cta,
.cta-btn,
.calculate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  background: var(--primary);
  color: #fff !important;
  border-radius: 0.8rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(228, 60, 83, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-cta {
  padding: 0.65rem 1rem;
}

.cta-btn,
.secondary-btn,
.calculate-btn,
.wide-btn {
  min-height: 48px;
  padding: 0.8rem 1.2rem;
}

.cta-btn:hover,
.secondary-btn:hover,
.calculate-btn:hover,
.nav-cta:hover {
  transform: translateY(-1px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--foreground);
  border-radius: 0.8rem;
  font-weight: 600;
}

.wide-btn {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--foreground);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-pro {
  padding: 7rem 0 5.5rem;
  background: rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(38, 38, 48, 0.05);
}

.hero-inner {
  text-align: center;
}

.hero-copy-pro {
  width: min(900px, 100%);
  margin: 0 auto;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(228, 60, 83, 0.15);
  background: rgba(228, 60, 83, 0.08);
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
}

.eyebrow-icon,
.feature-mark,
.insight-icon,
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-copy-pro h1 {
  margin-top: 1.35rem;
  font-size: clamp(3rem, 7vw, 5.3rem);
  font-weight: 800;
  max-width: 13ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-copy-pro h1 span {
  color: var(--primary);
}

.hero-copy-pro p {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.calculator-band,
.faq-band {
  padding: 5.5rem 0;
  background: rgba(242, 240, 236, 0.58);
  border-top: 1px solid rgba(38, 38, 48, 0.05);
  border-bottom: 1px solid rgba(38, 38, 48, 0.05);
}

.info-band,
.tips-band,
.soft-band {
  padding: 5.5rem 0;
}

.soft-band {
  background: rgba(242, 240, 236, 0.34);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.section-heading.center {
  text-align: center;
  align-items: center;
}

.section-heading.left {
  align-items: flex-start;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(2.1rem, 5vw, 3rem);
}

.section-heading h3 {
  font-size: 1.45rem;
}

.section-heading p {
  color: var(--muted-foreground);
  max-width: 42rem;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2rem;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.panel,
.how-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-panel,
.empty-state,
.table-panel,
.insight-card,
.stat-card,
.total-card,
.info-card,
.user-card,
.seo-panel {
  padding: 1.5rem;
}

.form-panel {
  position: sticky;
  top: 92px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
}

.panel-head {
  padding: 1.5rem 1.5rem 1.25rem;
  margin: -1.5rem -1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card-solid);
}

.panel-head h3 {
  font-size: 1.3rem;
}

.panel-head p,
.mini-label,
.form-group small,
.user-card small,
.stat-card p,
.total-card p {
  color: var(--muted-foreground);
}

.mini-label {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.preset-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: #fff;
  min-height: 62px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.preset-button strong {
  font-size: 0.96rem;
}

.preset-button span {
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.preset-button:hover,
.preset-button.active {
  border-color: rgba(228, 60, 83, 0.4);
  background: rgba(228, 60, 83, 0.04);
  transform: translateY(-1px);
}

.pro-form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.form-group {
  display: grid;
  gap: 0.45rem;
}

.form-group label {
  font-weight: 700;
}

.form-group input {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--foreground);
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-left: 3rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-weight: 700;
  font-size: 0.92rem;
}

.form-group input:focus,
.segment-button:focus,
.faq-question:focus,
.secondary-btn:focus,
.cta-btn:focus,
.calculate-btn:focus {
  outline: 2px solid rgba(228, 60, 83, 0.22);
  outline-offset: 2px;
}

.form-group input.error {
  border-color: var(--primary);
  background: #fff7f8;
}

.error-message {
  min-height: 1rem;
  color: var(--primary);
  font-size: 0.82rem;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-height: 52px;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
}

.segment-button {
  min-height: 42px;
  border: none;
  background: transparent;
  border-radius: 0.55rem;
  color: var(--muted-foreground);
  font-weight: 600;
  cursor: pointer;
}

.segment-button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(228, 60, 83, 0.22);
}

.calculate-btn {
  min-height: 58px;
  font-size: 1.08rem;
}

.results-column {
  display: grid;
  gap: 1.25rem;
}

.empty-state {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-style: dashed;
  border-width: 2px;
  background: transparent;
  box-shadow: none;
}

.empty-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(38, 38, 48, 0.05);
  color: rgba(38, 38, 48, 0.4);
  font-size: 1.4rem;
  font-weight: 700;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  width: min(260px, 100%);
  color: var(--muted-foreground);
}

.results-pro {
  display: none;
}

.results-pro.show {
  display: grid;
  gap: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.total-card {
  grid-column: 1 / -1;
  min-height: 160px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 26px 60px rgba(228, 60, 83, 0.28);
}

.currency-badge {
  position: absolute;
  right: 1.4rem;
  top: 1rem;
  font-size: 6.5rem;
  line-height: 1;
  opacity: 0.15;
  font-weight: 800;
  font-family: "Sora", sans-serif;
}

.total-card p,
.total-pill {
  color: rgba(255, 255, 255, 0.82);
}

.total-card h3 {
  margin-top: 0.55rem;
  font-size: clamp(2.7rem, 6vw, 4.35rem);
}

.total-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.86rem;
  font-weight: 600;
}

.stat-card h3 {
  margin-top: 0.25rem;
  font-size: 1.7rem;
}

.insight-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: #e7faf0;
  border-color: var(--success-border);
}

.insight-card h4 {
  color: var(--success-text);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.insight-card p {
  color: rgba(32, 114, 74, 0.88);
}

.insight-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #dff5e7;
  color: var(--success-text);
  font-weight: 800;
}

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

.pro-table {
  width: 100%;
  border-collapse: collapse;
}

.pro-table thead {
  background: rgba(242, 240, 236, 0.9);
}

.pro-table th,
.pro-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(38, 38, 48, 0.08);
  white-space: nowrap;
}

.pro-table th {
  font-size: 0.8rem;
  text-transform: none;
  color: var(--muted-foreground);
}

.pro-table tbody tr:hover {
  background: rgba(242, 240, 236, 0.45);
}

.align-right,
.pro-table td.align-right {
  text-align: right;
}

.download-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-mark {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 0.9rem;
  background: rgba(228, 60, 83, 0.1);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.info-card h3,
.user-card h3 {
  margin-bottom: 0.65rem;
}

.info-card p,
.user-card p {
  color: var(--muted-foreground);
}

.user-card small {
  display: inline-block;
  margin: 0 0 0.8rem;
}

.how-card {
  margin-top: 2rem;
  padding: 2.8rem 3rem;
  background: rgba(242, 240, 236, 0.7);
  border-radius: 1.8rem;
}

.how-card h3 {
  font-size: 1.65rem;
  margin-bottom: 1.6rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.35rem;
  padding: 0 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(228, 60, 83, 0.28), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.4rem;
  align-items: center;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 1;
}

.timeline-step {
  position: relative;
  z-index: 1;
  grid-column: 2;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(228, 60, 83, 0.22);
}

.timeline-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.tips-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 3rem;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.tips-layout h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 1.4rem;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.tips-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--muted-foreground);
}

.tips-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 800;
}

.tips-visual {
  display: flex;
  justify-content: center;
}

.tips-ring {
  width: min(340px, 75vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(228, 60, 83, 0.05);
  border: 12px solid rgba(228, 60, 83, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tips-ring span {
  color: var(--primary);
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
}

.seo-band {
  padding: 5.5rem 0;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(38, 38, 48, 0.05);
  border-bottom: 1px solid rgba(38, 38, 48, 0.05);
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.seo-grid + .seo-grid {
  margin-top: 1.25rem;
}

.seo-grid-wide {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.seo-panel h3 {
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}

.seo-panel p {
  color: var(--muted-foreground);
}

.seo-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted-foreground);
}

.seo-steps li + li {
  margin-top: 0.65rem;
}

.seo-links {
  display: grid;
  gap: 0.8rem;
}

.seo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(242, 240, 236, 0.45);
  font-weight: 600;
}

.seo-links a:hover {
  border-color: rgba(228, 60, 83, 0.3);
  color: var(--primary);
}

.faq-wrap {
  width: min(760px, calc(100% - 2rem));
}

.faq-shell {
  display: grid;
  gap: 0;
  padding: 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin: 0 auto;
}

.faq-item + .faq-item {
  border-top: 1px solid rgba(38, 38, 48, 0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1rem;
  border: none;
  background: transparent;
  color: var(--foreground);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  color: var(--primary);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  content: "-";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-answer p {
  padding: 0 1rem 0;
  color: var(--muted-foreground);
}

.faq-item.active .faq-answer {
  max-height: 180px;
  padding-bottom: 1rem;
}

.app-footer {
  padding: 3.5rem 0 2rem;
  background: #fff;
  border-top: 1px solid rgba(38, 38, 48, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand-col p,
.legal-copy,
.footer-links a,
.footer-bottom p {
  color: var(--muted-foreground);
}

.footer-grid h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links.stack {
  display: grid;
  gap: 0.7rem;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(38, 38, 48, 0.08);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 1024px) {
  .calculator-layout,
  .tips-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }

  .three-up,
  .stats-grid,
  .seo-grid,
  .seo-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .total-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-block;
  }

  .app-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 1rem;
    border-bottom: 1px solid rgba(38, 38, 48, 0.08);
    background: rgba(252, 250, 247, 0.98);
    box-shadow: var(--shadow-sm);
  }

  .app-nav.active {
    display: block;
  }

  .app-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .app-nav a {
    display: block;
    padding: 0.2rem 0;
  }

  .hero-pro {
    padding: 4.5rem 0 3.5rem;
  }

  .period-grid,
  .download-row,
  .preset-grid,
  .three-up,
  .stats-grid,
  .seo-grid,
  .seo-grid-wide {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding: 0;
  }

  .timeline::before {
    left: 1rem;
    transform: none;
  }

  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .timeline-step {
    grid-column: 1;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
  }

  .container,
  .faq-wrap {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .hero-copy-pro h1 {
    font-size: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .how-card {
    padding: 1.4rem;
  }
}

@media print {
  .site-header,
  .hero-pro,
  .calculator-band .form-panel,
  .info-band,
  .soft-band,
  .tips-band,
  .faq-band,
  .app-footer,
  .download-row {
    display: none !important;
  }

  .results-pro {
    display: grid !important;
  }

  body {
    background: #fff;
  }

  .panel {
    box-shadow: none;
    background: #fff;
  }
}
