/* ============================================================
   SoCrates public tools styles
   Shared by public-facing calculator/tool pages.
   ============================================================ */

body {
  background: var(--land-white);
}

.tool-page {
  overflow: hidden;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.land-nav__links a.tool-nav__btn {
  padding: 7px 18px;
  font-size: 0.88rem;
}

.land-nav__links a.tool-nav__btn.btn-ghost {
  color: var(--land-text);
}

.land-nav__links a.tool-nav__btn.btn-primary {
  color: #06121f;
}

.tool-hero {
  position: relative;
  background:
    radial-gradient(75% 85% at 10% 0%, rgba(88,166,255,.24), rgba(88,166,255,0) 58%),
    radial-gradient(65% 90% at 100% 0%, rgba(45,164,78,.12), rgba(45,164,78,0) 55%),
    linear-gradient(180deg, #07101d 0%, #0b1627 58%, #0d1a2f 100%);
  padding: 28px 0 124px;
}

.tool-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 144px;
  background: linear-gradient(180deg, rgba(246,248,250,0) 0%, rgba(246,248,250,.96) 100%);
  pointer-events: none;
}

.tool-hero .container {
  position: relative;
  z-index: 1;
}

.tool-hero__surface {
  position: relative;
  padding: clamp(24px, 3.4vw, 34px);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(10,18,32,.94), rgba(11,24,43,.92));
  border: 1px solid rgba(116, 148, 190, 0.22);
  box-shadow: 0 34px 72px rgba(2, 8, 18, 0.34);
  overflow: hidden;
}

.tool-hero__surface::before {
  content: "";
  position: absolute;
  left: -8%;
  bottom: 16%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(88,166,255,.24), rgba(88,166,255,0) 68%);
  filter: blur(8px);
  pointer-events: none;
}

.tool-hero__surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,0) 32%),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0));
  opacity: 0.2;
  pointer-events: none;
}

.tool-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 26px;
  align-items: start;
}

.tool-hero__copy {
  display: flex;
  flex-direction: column;
  color: #e6edf3;
}

.tool-hero__eyebrow,
.tool-card-head__eyebrow,
.tool-results-card__eyebrow,
.tool-presets__label,
.tool-snapshot-card__label,
.tool-hero-stat__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(88,166,255,.12);
  border: 1px solid rgba(88,166,255,.28);
  color: #9ccaff;
}

.tool-hero__title {
  margin: 20px 0 16px;
  font-size: clamp(2.5rem, 5.8vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #f0f6fc;
  max-width: 11ch;
}

.tool-hero__sub {
  max-width: 42ch;
  font-size: 1.03rem;
  line-height: 1.7;
  color: rgba(223, 234, 248, 0.82);
}

.tool-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.tool-hero .btn-primary {
  background: linear-gradient(180deg, #79c0ff, #58a6ff);
  border-color: transparent;
  color: #06121f;
  box-shadow: 0 16px 30px rgba(31,111,235,.24);
}

.tool-hero .btn-primary:hover {
  background: linear-gradient(180deg, #8fcbff, #69b0ff);
  color: #06121f;
}

.tool-hero .btn-ghost {
  color: #d7e6f7;
  border-color: rgba(129, 157, 191, 0.56);
  background: rgba(7, 14, 24, 0.42);
}

.tool-hero .btn-ghost:hover {
  background: rgba(121, 192, 255, 0.12);
  border-color: rgba(121, 192, 255, 0.66);
}

.tool-hero__points {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 18px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(8, 19, 33, 0.56);
  border: 1px solid rgba(120, 162, 214, 0.34);
  color: #d7e6f7;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.tool-hero__snapshot {
  align-self: stretch;
}

.tool-snapshot-card {
  position: relative;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(15,27,46,.94), rgba(12,22,38,.96));
  border: 1px solid rgba(91, 124, 169, 0.34);
  box-shadow: 0 22px 46px rgba(2, 7, 15, 0.24);
}

.tool-snapshot-card__label {
  display: block;
  margin-bottom: 14px;
  color: #9ccaff;
}

.tool-snapshot-card__value {
  display: block;
  font-size: clamp(1.7rem, 3.1vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f0f6fc;
}

.tool-snapshot-card__body {
  margin-top: 14px;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(223, 234, 248, 0.78);
}

.tool-snapshot-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  list-style: none;
  border-top: 1px solid rgba(91, 124, 169, 0.24);
}

.tool-snapshot-list li {
  position: relative;
  padding-left: 18px;
  color: #e6edf3;
  line-height: 1.55;
}

.tool-snapshot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79c0ff;
}

.tool-snapshot-note {
  margin-top: 16px;
  color: rgba(211, 225, 241, 0.72);
  line-height: 1.6;
}

.tool-workbench {
  position: relative;
  margin-top: -74px;
  padding: 0 0 88px;
}

.tool-workbench__frame {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(88,166,255,.14);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 22px 64px rgba(16, 37, 68, 0.12);
}

.tool-workbench__frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(88,166,255,.08), rgba(88,166,255,0));
  pointer-events: none;
}

.tool-workbench__top,
.tool-shell {
  position: relative;
  z-index: 1;
}

.tool-workbench__top {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.tool-section-head {
  margin-bottom: 0;
}

.tool-section-head--tight {
  margin-bottom: 20px;
}

.tool-presets-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: none;
}

.tool-presets__label {
  color: var(--land-accent-dark);
}

.tool-workbench__title {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--land-text);
  scroll-margin-top: calc(var(--land-nav-h) + 18px);
}

.tool-presets__hint {
  color: var(--land-text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.tool-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
  padding: 12px;
  border-radius: 24px;
  background: #edf4fc;
  border: 1px solid rgba(88,166,255,.14);
}

.tool-preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 138px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.66);
  color: var(--land-text-muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s, background 0.16s, color 0.16s;
}

.tool-preset__title {
  display: block;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--land-text);
}

.tool-preset__meta {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--land-accent-dark);
}

.tool-preset__desc {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--land-text-muted);
}

.tool-preset:hover,
.tool-preset:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
  border-color: rgba(88,166,255,.18);
  box-shadow: 0 8px 18px rgba(25, 48, 87, 0.08);
  outline: none;
}

.tool-preset.is-active {
  background: #0f1d32;
  color: #f0f6fc;
  border-color: rgba(121,192,255,.22);
  box-shadow: 0 10px 18px rgba(8, 21, 36, 0.18);
}

.tool-preset.is-active .tool-preset__title,
.tool-preset.is-active .tool-preset__meta {
  color: #f0f6fc;
}

.tool-preset.is-active .tool-preset__desc {
  color: rgba(226, 235, 247, 0.76);
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.tool-form-card,
.tool-results-card,
.tool-info-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(88,166,255,.16);
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(25, 48, 87, 0.08);
}

.tool-form-card {
  padding: 28px;
}

.tool-card-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(88,166,255,.12);
}

.tool-card-head__eyebrow,
.tool-results-card__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--land-accent-dark);
}

.tool-card-head h3,
.tool-results-card__head h3 {
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--land-text);
}

.tool-card-head p,
.tool-results-card__head p {
  margin-top: 8px;
  color: var(--land-text-muted);
  line-height: 1.6;
}

.tool-form-groups {
  display: grid;
  gap: 14px;
}

.tool-form-group {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fcfdff 0%, #f4f8fc 100%);
  border: 1px solid rgba(88,166,255,.14);
}

.tool-form-group__head {
  margin-bottom: 18px;
}

.tool-form-group__title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tool-form-group__icon.feature-card__icon {
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 15px;
  flex-shrink: 0;
}

.tool-form-group__icon .feature-card__glyph {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.tool-form-group__title > div {
  min-width: 0;
}

.tool-form-group__title h4 {
  margin-bottom: 6px;
}

.tool-form-group__title p {
  margin: 0;
}

.tool-form-group__head h4 {
  font-size: 1.04rem;
  line-height: 1.25;
  color: var(--land-text);
  margin-bottom: 6px;
}

.tool-form-group__head p {
  color: var(--land-text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.tool-form-group__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.tool-field__label {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--land-text);
}

.tool-field__meta {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--land-text-muted);
}

.tool-field > input,
.tool-field > .tool-field__input-wrap {
  margin-top: auto;
}

.tool-field input {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(88,166,255,.18);
  background: #ffffff;
  color: var(--land-text);
  font: inherit;
  font-size: 1rem;
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(15,23,42,.04);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.tool-field input:hover {
  border-color: rgba(88,166,255,.32);
}

.tool-field input:focus {
  outline: none;
  border-color: rgba(31,111,235,.65);
  box-shadow: 0 0 0 4px rgba(88,166,255,.14);
}

.tool-field__input-wrap {
  position: relative;
}

.tool-field__input-wrap input {
  padding-right: 72px;
}

.tool-field__prefix,
.tool-field__suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--land-text-muted);
  pointer-events: none;
}

.tool-field__prefix {
  left: 14px;
}

.tool-field__suffix {
  right: 14px;
}

.tool-field__input-wrap .tool-field__prefix + input {
  padding-left: 30px;
  padding-right: 14px;
}

.tool-form__note {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15,29,50,.05), rgba(15,29,50,.02));
  border: 1px solid rgba(88,166,255,.14);
  color: var(--land-text-muted);
  line-height: 1.7;
}

.tool-form__note strong {
  color: var(--land-text);
}

.tool-results-card {
  position: sticky;
  top: 88px;
  padding: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,248,255,.98));
}

.tool-results-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -90px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(88,166,255,.16), rgba(88,166,255,0) 72%);
  pointer-events: none;
}

.tool-results-card__head {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(88,166,255,.12);
}

.tool-results-card__summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tool-results-card__copy {
  min-width: 0;
}

.tool-results-card__icon.feature-card__icon {
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 17px;
  flex-shrink: 0;
}

.tool-results-card__icon .feature-card__glyph {
  width: 30px;
  height: 30px;
}

.tool-results-card__copy .tool-results-card__eyebrow {
  margin-bottom: 8px;
}

.tool-kpis {
  position: relative;
  display: grid;
  gap: 12px;
}

.tool-kpi {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249,252,255,.98), rgba(242,247,252,.96));
  border: 1px solid rgba(88,166,255,.12);
}

.tool-kpi--accent {
  background: linear-gradient(180deg, #0f1d32 0%, #142741 100%);
  border-color: rgba(121,192,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.tool-kpi__label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--land-text-muted);
}

.tool-kpi__value {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--land-text);
}

.tool-kpi__sub {
  display: block;
  color: var(--land-text-muted);
  line-height: 1.55;
}

.tool-kpi--accent .tool-kpi__label {
  color: rgba(193, 215, 242, 0.74);
}

.tool-kpi--accent .tool-kpi__value {
  color: #f0f6fc;
}

.tool-kpi--accent .tool-kpi__sub {
  color: rgba(226, 235, 247, 0.74);
}

.tool-capture {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(88,166,255,.14);
}

.tool-capture__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--land-text-muted);
  margin-bottom: 8px;
}

.tool-capture__row strong {
  color: var(--land-text);
}

.tool-capture__bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(208,215,222,.6);
  overflow: hidden;
  margin-bottom: 14px;
}

.tool-capture__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d8590, #57606a);
}

.tool-capture__bar--accent span {
  background: linear-gradient(90deg, #1f6feb, #58a6ff);
}

.tool-facts {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.tool-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(88,166,255,.12);
}

.tool-fact:last-child {
  border-bottom: none;
}

.tool-fact dt {
  color: var(--land-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-fact dd {
  color: var(--land-text);
  font-size: 1rem;
  font-weight: 800;
  text-align: right;
}

.tool-insight {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: #0f1d32;
  color: #e6edf3;
  line-height: 1.75;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.tool-results-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.tool-results-card__actions .btn {
  width: 100%;
}

.tool-explainer {
  padding: 0 0 84px;
}

.tool-explainer .tool-section-head {
  margin-bottom: 28px;
}

.tool-explainer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.tool-info-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.tool-info-card__icon.feature-card__icon {
  width: 54px;
  height: 54px;
  margin: 0 0 14px;
  border-radius: 16px;
}

.tool-info-card__icon .feature-card__glyph {
  width: 28px;
  height: 28px;
}

.tool-info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #58a6ff, rgba(88,166,255,0));
}

.tool-info-card h3 {
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--land-text);
  margin-bottom: 12px;
}

.tool-info-card p,
.tool-info-card li {
  color: var(--land-text-muted);
  line-height: 1.75;
}

.tool-info-card ul {
  margin-top: 14px;
  padding-left: 18px;
}

.tool-info-card li + li {
  margin-top: 8px;
}

.tool-cta-band {
  padding: 0 0 88px;
}

.tool-cta-band__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 38px;
  border-radius: 28px;
  background:
    radial-gradient(110% 170% at 0% 0%, rgba(88,166,255,.3), rgba(88,166,255,0) 55%),
    linear-gradient(180deg, #0c1628 0%, #0a1321 100%);
  border: 1px solid rgba(88,166,255,.22);
  box-shadow: 0 26px 52px rgba(3, 8, 18, 0.34);
}

.section-label--light {
  color: rgba(121,192,255,.8);
}

.tool-cta-band .section-title {
  color: #f0f6fc;
  text-align: left;
  margin-bottom: 12px;
}

.tool-cta-band .section-sub {
  max-width: 680px;
  margin: 0;
  color: rgba(223, 234, 248, 0.72);
  text-align: left;
}

.tool-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
}

.tool-cta-band .btn-ghost {
  color: #e6edf3;
  border-color: rgba(173, 198, 229, 0.72);
  background: rgba(8, 17, 30, 0.32);
}

.tool-cta-band .btn-ghost:hover {
  color: #f0f6fc;
  border-color: rgba(173, 198, 229, 0.9);
  background: rgba(121, 192, 255, 0.16);
}

@media (max-width: 1120px) {
  .tool-hero__grid,
  .tool-shell,
  .tool-explainer__grid {
    grid-template-columns: 1fr;
  }

  .tool-workbench {
    margin-top: -56px;
  }

  .tool-results-card {
    position: static;
  }

  .tool-cta-band__inner {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 860px) {
  .tool-form-group__grid {
    grid-template-columns: 1fr;
  }

  .tool-hero__points {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .tool-hero {
    padding: 20px 0 104px;
  }

  .tool-hero__surface,
  .tool-workbench__frame,
  .tool-form-card,
  .tool-results-card,
  .tool-info-card,
  .tool-cta-band__inner {
    border-radius: 24px;
    padding: 22px;
  }

  .tool-hero__title {
    max-width: none;
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .tool-results-card__icon.feature-card__icon {
    width: 50px;
    height: 50px;
  }

  .tool-results-card__icon .feature-card__glyph {
    width: 26px;
    height: 26px;
  }

  .tool-form-group__icon.feature-card__icon,
  .tool-info-card__icon.feature-card__icon {
    width: 44px;
    height: 44px;
  }

  .tool-form-group__icon .feature-card__glyph,
  .tool-info-card__icon .feature-card__glyph {
    width: 22px;
    height: 22px;
  }

  .tool-workbench {
    margin-top: -42px;
    padding-bottom: 72px;
  }
}

@media (max-width: 560px) {
  .tool-hero__actions,
  .tool-hero__points,
  .tool-cta-band__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-presets {
    grid-template-columns: 1fr;
  }

  .tool-results-card__actions {
    grid-template-columns: 1fr;
  }

  .tool-preset,
  .tool-results-card__actions .btn {
    width: 100%;
  }

  .tool-fact {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-fact dd {
    text-align: left;
  }
}
