/* Calculator only: restrained tool-first layout.
   The main form begins in the first viewport at desktop and mobile widths. */
.calc-page {
  color-scheme: light;
  --calc-ink: #252238;
  --calc-muted: #727184;
  --calc-line: #e7e5ed;
  --calc-accent: #6447c6;
  --calc-hover: #5339b4;
  color: var(--calc-ink);
  background: #f8f8fb;
  font-size: 15px;
}
.calc-page .seo-layout { width: min(980px, calc(100% - 48px)); }
.calc-page .seo-header {
  background: #fff;
  border-bottom: 1px solid #eeedf2;
}
.calc-page .seo-header .seo-layout { min-height: 66px; }
.calc-page .seo-logo { gap: 9px; font-size: 19px; letter-spacing: -.045em; font-weight: 750; }
.calc-page .seo-logo img { width: 35px; height: 35px; }
.calc-page .seo-nav { gap: 22px; font-size: 13px; }
.calc-page .seo-nav [aria-current="page"] { color: #3f365f; font-weight: 680; }
.calc-intro {
  padding: 32px 0 22px;
  max-width: 860px;
}
.calc-intro h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.047em;
  font-weight: 760;
  margin: 0 0 9px;
  color: #242039;
}
.calc-intro p {
  max-width: 650px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #666478;
}
.calc-page .seo-main {
  gap: 28px;
  padding-bottom: 64px;
}
.calc-page .calc-panel {
  padding: 30px 32px 28px;
  background: white;
  border: 1px solid #e8e6ef;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(29, 26, 48, .035);
}
.calc-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 19px;
}
.calc-page .calc-panel h2 {
  font-size: 17px;
  letter-spacing: -.02em;
  font-weight: 730;
  line-height: 1.3;
  margin: 0;
  color: #252238;
}
.calc-panel-heading span {
  font-size: 12px;
  line-height: 1.4;
  color: #8b8898;
}
.calc-page .seo-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 14px;
}
.calc-page .seo-field {
  min-width: 0;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: #514c65;
  line-height: 1.25;
}
.calc-page .seo-field input,
.calc-page .seo-field select {
  height: 47px;
  min-height: 47px;
  padding: 9px 12px;
  border: 1px solid #dedce7;
  border-radius: 10px;
  background: #fff;
  color: #29253c;
  font-size: 14px;
  font-weight: 550;
  box-shadow: 0 1px 2px rgba(20, 18, 35, .02);
}
.calc-page .seo-field input:hover,
.calc-page .seo-field select:hover { border-color: #bcb6d2; }
.calc-page .seo-field input:focus,
.calc-page .seo-field select:focus { border-color: #7355d7; outline: 3px solid #e6ddfc; outline-offset: 0; }
.calc-page .seo-field select { cursor: pointer; }
.calc-field-wide { grid-column: span 2; }
/* Compact native radio groups: keyboard accessible, no dropdowns or JS state. */
.calc-choice-fieldset {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.calc-choice-fieldset legend {
  padding: 0;
  margin: 0 0 8px;
  color: #514c65;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
}
.calc-activity-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.calc-option, .calc-goal-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
.calc-option-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.calc-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 9px 7px 8px;
  border-radius: 11px;
  border: 1px solid #dedce7;
  background: white;
  text-align: center;
  transition: background-color .14s ease, border-color .14s ease;
}
.calc-option-card svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #847c98;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  margin-bottom: 4px;
}
.calc-option-title {
  display: block;
  color: #403a50;
  font-size: 12.5px;
  font-weight: 710;
  line-height: 1.3;
}
.calc-option-sub {
  display: block;
  margin-top: 2px;
  color: #8b8795;
  font-size: 11px;
  font-weight: 430;
  line-height: 1.3;
}
.calc-option:hover .calc-option-card,
.calc-goal-option:hover span { border-color: #b6add0; background: #fbfaff; }
.calc-option-input:focus-visible + .calc-option-card,
.calc-goal-option .calc-option-input:focus-visible + span {
  outline: 3px solid #cabcf4;
  outline-offset: 2px;
}
.calc-option-input:checked + .calc-option-card {
  border-color: #8d76de;
  background: #f7f3ff;
}
.calc-option-input:checked + .calc-option-card svg { stroke: #6245c6; }
.calc-option-input:checked + .calc-option-card .calc-option-title { color: #563db6; }
.calc-option-input:checked + .calc-option-card .calc-option-sub { color: #6d5c99; }
/* Sex uses the same native radio styling as goal, without increasing row height. */
.calc-sex-fieldset { grid-column: span 1; }
.calc-sex-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.calc-sex-option span {
  min-width: 0;
  min-height: 47px;
  padding: 8px 3px;
  font-size: 11.5px;
  letter-spacing: -.025em;
}

.calc-goal-options {
  display: grid;
  width: min(100%, 570px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.calc-goal-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid #dedce7;
  border-radius: 10px;
  background: #fff;
  color: #514c65;
  font-size: 12.5px;
  font-weight: 620;
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease;
}
.calc-goal-option .calc-option-input:checked + span {
  color: #563db6;
  background: #f7f3ff;
  border-color: #8d76de;
  font-weight: 720;
}

.calc-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 4px;
}
.calc-page .seo-button {
  flex: 0 0 auto;
  min-width: 246px;
  height: 48px;
  min-height: 48px;
  padding: 11px 22px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--calc-accent);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.012em;
  box-shadow: none;
  transition: background-color .16s ease;
}
.calc-page .seo-button:hover { color: #fff; background: var(--calc-hover); }
.calc-actions-note {
  font-size: 12px;
  line-height: 1.45;
  color: #858292;
  max-width: 360px;
}
.calc-page .seo-results {
  background: #f5f2fd;
  border: 1px solid #e9e2f9;
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
}
.calc-page .seo-results.is-error { background: #fff1f2; border-color: #f4d2d9; }
.calc-page .seo-results #calc-status {
  color: #625a78;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
}
.calc-page .seo-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-page .seo-result-grid div {
  border: 1px solid #ede9f5;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
}
.calc-page .seo-result-grid .seo-result-main {
  grid-column: 1 / -1;
  background: #fff;
  border-color: #e3d9f7;
}
.calc-page .seo-result-grid small {
  color: #777288;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.calc-page .seo-result-grid strong {
  font-size: clamp(17px, 2.8vw, 21px);
  line-height: 1.2;
  font-weight: 750;
  color: #2a2640;
  white-space: nowrap;
}
.calc-page .seo-result-main strong { font-size: clamp(27px, 3.8vw, 36px); color: #573bb9; }
.calc-page .seo-results .seo-note { margin: 12px 0 0; font-size: 12px !important; color: #777288; }
.calc-editorial { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.calc-page .calc-editorial .seo-panel {
  min-width: 0;
  padding: 27px 29px;
  box-shadow: none;
  border: 1px solid #eceaf1;
  border-radius: 16px;
  background: #fff;
}
.calc-page .calc-editorial .seo-panel h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.025em;
  margin-bottom: 15px;
  color: #262238;
}
.calc-page .calc-editorial .seo-panel h3 { font-size: 17px; line-height: 1.3; }
.calc-page .calc-editorial .seo-panel p {
  font-size: 13.5px;
  line-height: 1.75;
  color: #666377;
  margin-bottom: 13px;
}
.calc-page .calc-editorial .seo-panel a:not(.seo-button) { color: #6447c6; text-decoration: underline; text-underline-offset: 2px; }
.calc-page .calc-editorial .seo-faq { grid-column: 1 / -1; }
.calc-page .calc-editorial .seo-links { gap: 10px; }
.calc-page .calc-editorial .seo-button-secondary {
  min-width: 0;
  min-height: 42px;
  height: auto;
  border: 1px solid #dcd5f0;
  background: #f8f6fc;
  color: #5b42b6;
  box-shadow: none;
  padding: 11px 16px;
  font-size: 12px;
  border-radius: 10px;
}
.calc-page .calc-editorial .seo-button-secondary:hover { background: #efebfa; color: #5037ae; }
.calc-page .seo-faq details { padding: 14px 0; border-color: #edeaf2; }
.calc-page .seo-faq summary { font-size: 14px; color: #302a46; }
.calc-page .seo-footer { background: #27233b; }
@media (max-width: 760px) {
  .calc-page .seo-layout { width: min(100% - 32px, 680px); }
  .calc-page .seo-header .seo-layout { min-height: 59px; gap: 12px; }
  .calc-page .seo-nav { gap: 12px; }
  .calc-page .seo-nav [aria-current="page"] { display: none; }
  .calc-intro { padding: 23px 0 17px; }
  .calc-intro h1 { font-size: clamp(29px, 7.6vw, 37px); line-height: 1.12; margin-bottom: 8px; }
  .calc-intro p { font-size: 13.5px; line-height: 1.48; }
  .calc-page .calc-panel { padding: 19px 17px; border-radius: 16px; }
  .calc-panel-heading { margin-bottom: 17px; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; }
  .calc-page .calc-panel h2 { font-size: 15px; }
  .calc-panel-heading span { font-size: 11px; }
  .calc-page .seo-form { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .calc-page .seo-field { font-size: 12px; }
  .calc-page .seo-field input, .calc-page .seo-field select { height: 44px; min-height: 44px; padding: 8px 10px; font-size: 13px; }
  .calc-field-wide { grid-column: 1 / -1; }
  .calc-activity-options { gap: 6px; }
  .calc-option-card { min-height: 77px; padding: 7px 2px 6px; border-radius: 9px; }
  .calc-option-card svg { width: 17px; height: 17px; margin-bottom: 3px; }
  .calc-option-title { font-size: 11px; }
  .calc-option-sub { font-size: 9px; letter-spacing: -.025em; line-height: 1.22; }
  .calc-choice-fieldset legend { font-size: 12px; margin-bottom: 6px; }
  .calc-sex-option span { min-height: 44px; font-size: 10.75px; padding-inline: 1px; }
  .calc-goal-options { width: 100%; gap: 6px; }
  .calc-goal-option span { min-height: 40px; padding: 8px 4px; font-size: 11px; border-radius: 9px; }
  .calc-actions { flex-direction: column; align-items: stretch; gap: 9px; margin-top: 2px; }
  .calc-page .seo-button { width: 100%; min-width: 0; height: 47px; }
  .calc-actions-note { max-width: none; font-size: 11px; text-align: center; }
  .calc-editorial { grid-template-columns: 1fr; gap: 14px; }
  .calc-page .calc-editorial .seo-panel { padding: 22px 19px; }
  .calc-page .calc-editorial .seo-faq { grid-column: auto; }
  .calc-page .seo-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .calc-page .seo-logo { font-size: 17px; }
  .calc-page .seo-nav { font-size: 12px; gap: 9px; }
  .calc-page .seo-result-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .calc-page .seo-result-grid div { padding: 12px; }
  .calc-page .seo-result-grid strong { font-size: 15px; }
  .calc-page .seo-result-main strong { font-size: 28px; }
}
