.sqrt-page {
  --sqrt-green-1: #2f8f57;
  --sqrt-green-2: #4fad70;
  --sqrt-green-3: #e6f6eb;
  --sqrt-green-4: #f4fbf6;
  --sqrt-ink: #173929;
  --sqrt-ink-soft: #47695a;
  --sqrt-line: #cfe7d7;
  --sqrt-line-strong: #b7d9c2;
  --sqrt-shadow: 0 22px 44px rgba(38, 105, 65, 0.12);
  --sqrt-shadow-soft: 0 12px 28px rgba(38, 105, 65, 0.08);
  color: var(--sqrt-ink);
}

.sqrt-page,
.sqrt-page * {
  box-sizing: border-box;
}

.sqrt-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sqrt-line);
  border-radius: 30px;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(119, 215, 153, 0.26), transparent 30%),
    radial-gradient(circle at bottom right, rgba(191, 235, 206, 0.32), transparent 26%),
    linear-gradient(180deg, #fbfefc 0%, #f5fbf7 48%, #eef8f1 100%);
  box-shadow: var(--sqrt-shadow);
}

.sqrt-wrap::before,
.sqrt-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.sqrt-wrap::before {
  width: 320px;
  height: 320px;
  left: -140px;
  top: -110px;
  background: radial-gradient(circle, rgba(83, 185, 119, 0.16), transparent 68%);
}

.sqrt-wrap::after {
  width: 380px;
  height: 240px;
  right: -110px;
  top: 16px;
  background: radial-gradient(circle, rgba(164, 227, 186, 0.24), transparent 72%);
}

.sqrt-hero,
.sqrt-shell,
.sqrt-content-card,
.sqrt-quick-links {
  position: relative;
  z-index: 1;
}

.sqrt-hero {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 2px 2px 10px;
}

.sqrt-hero-icon {
  width: 84px;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 2px solid rgba(255,255,255,0.72);
  background: linear-gradient(180deg, #64c583 0%, #2f8f57 90%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.45),
    inset 0 -8px 16px rgba(21, 92, 50, 0.28),
    0 8px 18px rgba(47, 143, 87, 0.18),
    0 0 0 4px rgba(146, 224, 173, 0.14);
  display: grid;
  place-items: center;
  transform: rotate(-4deg);
  position: relative;
}

.sqrt-hero-icon::before,
.sqrt-hero-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 30px;
  border: 1px solid rgba(146, 224, 173, 0.34);
}

.sqrt-hero-icon::after {
  inset: -14px;
  border-color: rgba(146, 224, 173, 0.14);
}

.sqrt-hero-icon svg {
  width: 48px;
  height: 48px;
  stroke: #fff;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.sqrt-hero-copy h1 {
  margin: 0;
  color: #2f8f57;
  font-size: clamp(1.72rem, 3.3vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 5px 16px rgba(47, 143, 87, 0.1);
}

.sqrt-hero-copy p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--sqrt-ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 700;
}

.sqrt-badges,
.sqrt-actions,
.sqrt-example-pills,
.sqrt-bottom-notes,
.sqrt-trust-grid,
.sqrt-card-grid,
.sqrt-formula-grid,
.sqrt-related-grid {
  display: grid;
  gap: 14px;
}

.sqrt-badges,
.sqrt-quick-links,
.sqrt-actions,
.sqrt-example-pills {
  display: flex;
  flex-wrap: wrap;
}

.sqrt-badges {
  gap: 10px;
  margin-top: 14px;
}

.sqrt-badge,
.sqrt-quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #d6eada;
  background: rgba(255,255,255,0.78);
  color: #315847;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(58, 125, 83, 0.08);
}

.sqrt-quick-links {
  gap: 10px;
  margin: 10px 0 14px;
}

.sqrt-shell,
.sqrt-content-card {
  border: 1px solid var(--sqrt-line);
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84), var(--sqrt-shadow-soft);
}

.sqrt-shell {
  overflow: hidden;
}

.sqrt-calculator-head,
.sqrt-shell-body,
.sqrt-accordion-panel,
.sqrt-content-card {
  padding: 18px;
}

.sqrt-calculator-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sqrt-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241, 250, 245, 0.84));
}

.sqrt-title-group {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.sqrt-title-mark {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #69c787 0%, #2f8f57 100%);
  box-shadow: 0 12px 22px rgba(47, 143, 87, 0.16);
}

.sqrt-title-mark svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sqrt-title-text h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.1;
  color: #204733;
}

.sqrt-title-text p {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--sqrt-ink-soft);
}

.sqrt-mode-toggle {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  font-weight: 800;
  font-size: 0.92rem;
  color: #315847;
}

.sqrt-mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sqrt-mode-toggle > span:last-child {
  position: relative;
  display: inline-flex;
}

.sqrt-mode-slider {
  display: inline-flex;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d5eadb 0%, #c2dfcc 100%);
  border: 1px solid #b6d6c1;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.78);
  position: relative;
}

.sqrt-mode-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(40, 95, 60, 0.16);
  transition: transform .18s ease;
}

.sqrt-mode-toggle input:checked + .sqrt-mode-slider {
  background: linear-gradient(180deg, #63c583 0%, #2f8f57 100%);
  border-color: #2f8f57;
}

.sqrt-mode-toggle input:checked + .sqrt-mode-slider::after {
  transform: translateX(26px);
}

.sqrt-topbar {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sqrt-label {
  display: block;
  margin: 0;
  font-weight: 800;
  font-size: 0.96rem;
  color: #234734;
}

.sqrt-label-note {
  margin-top: 3px;
  font-size: 0.83rem;
  color: var(--sqrt-ink-soft);
}

.sqrt-select-wrap {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #315847;
}

.sqrt-select,
.sqrt-io-right input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--sqrt-line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--sqrt-ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.sqrt-select {
  padding: 11px 12px;
  font-weight: 700;
}

.sqrt-io-right input {
  padding: 15px 16px;
  font-size: 1.02rem;
  font-weight: 700;
}

.sqrt-select:focus,
.sqrt-io-right input:focus {
  border-color: #4fad70;
  box-shadow: 0 0 0 4px rgba(79, 173, 112, 0.16);
}

.sqrt-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.sqrt-io-card {
  display: grid;
  grid-template-columns: minmax(120px, 165px) minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--sqrt-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,250,245,0.92));
  box-shadow: 0 12px 24px rgba(51, 116, 76, 0.08);
  overflow: hidden;
}

.sqrt-io-left {
  padding: 12px;
  border-right: 1px solid var(--sqrt-line);
  background: rgba(236, 248, 240, 0.9);
}

.sqrt-io-right {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
}

.sqrt-io-right output {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 1.12rem;
  font-weight: 800;
  color: #1f5b39;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sqrt-swap {
  align-self: center;
  justify-self: center;
  width: 56px;
  height: 56px;
  border: 1px solid #9bcab0;
  border-radius: 18px;
  background: linear-gradient(180deg, #64c583 0%, #2f8f57 100%);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(47, 143, 87, 0.18);
  cursor: pointer;
}

.sqrt-swap:hover,
.sqrt-swap:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 173, 112, 0.16), 0 12px 24px rgba(47, 143, 87, 0.18);
}

.sqrt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sqrt-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sqrt-btn-main {
  color: #fff;
  background: linear-gradient(180deg, #63c583 0%, #2f8f57 100%);
  box-shadow: 0 12px 22px rgba(47, 143, 87, 0.16);
}

.sqrt-btn-secondary {
  color: #234734;
  background: linear-gradient(180deg, #ffffff 0%, #f0faf3 100%);
  border-color: var(--sqrt-line);
}

.sqrt-btn-outline {
  color: #315847;
  background: rgba(255,255,255,0.9);
  border-color: var(--sqrt-line-strong);
}

.sqrt-inline-help {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--sqrt-ink-soft);
}

.sqrt-inline-help > span {
  font-weight: 800;
  color: #315847;
}

.sqrt-example-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sqrt-example-pill {
  appearance: none;
  border: 1px solid #d2e8da;
  background: rgba(255,255,255,0.88);
  color: #315847;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.sqrt-alert {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #f0c8a7;
  background: #fff4ea;
  color: #8a4b1b;
  font-weight: 700;
}

.sqrt-alert.is-visible {
  display: block;
}

.sqrt-accordion {
  border-top: 1px solid var(--sqrt-line);
}

.sqrt-accordion-toggle {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: #234734;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.sqrt-accordion-toggle span:last-child {
  transition: transform .18s ease;
}

.sqrt-accordion:not(.is-open) .sqrt-accordion-toggle span:last-child {
  transform: rotate(-90deg);
}

.sqrt-accordion-panel {
  padding-top: 0;
}

.sqrt-accordion:not(.is-open) .sqrt-accordion-panel {
  display: none;
}

.sqrt-result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.sqrt-result-tab {
  appearance: none;
  border: 1px solid var(--sqrt-line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef8f1 100%);
  color: #315847;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sqrt-result-tab.is-active {
  color: #fff;
  border-color: #2f8f57;
  background: linear-gradient(180deg, #63c583 0%, #2f8f57 100%);
}

.sqrt-result-grid,
.sqrt-trust-grid,
.sqrt-card-grid,
.sqrt-formula-grid,
.sqrt-related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sqrt-info-table,
.sqrt-mini-note,
.sqrt-steps-card,
.sqrt-trust-card,
.sqrt-mini-card,
.sqrt-formula-card,
.sqrt-related-card {
  border: 1px solid var(--sqrt-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243, 250, 246, 0.94));
  box-shadow: 0 10px 24px rgba(58, 125, 83, 0.07);
}

.sqrt-info-table,
.sqrt-mini-note,
.sqrt-steps-card,
.sqrt-trust-card,
.sqrt-mini-card,
.sqrt-formula-card,
.sqrt-related-card,
.sqrt-reference-item {
  padding: 16px;
}

.sqrt-info-table {
  display: grid;
  gap: 10px;
}

.sqrt-info-row {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--sqrt-line);
}

.sqrt-info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sqrt-info-row:first-child {
  padding-top: 0;
}

.sqrt-info-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #315847;
}

.sqrt-status-good,
.sqrt-status-bad,
.sqrt-note-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.sqrt-status-good,
.sqrt-note-icon {
  background: #e6f6eb;
  color: #2f8f57;
}

.sqrt-status-bad {
  background: #fff0e5;
  color: #d06c26;
}

.sqrt-info-value,
.sqrt-mini-note,
.sqrt-step-text,
.sqrt-faq-body,
.sqrt-reference-item span,
.sqrt-related-card p,
.sqrt-mini-card p,
.sqrt-trust-card p,
.sqrt-formula-card p,
.sqrt-prose p {
  color: var(--sqrt-ink-soft);
  overflow-wrap: anywhere;
}

.sqrt-mini-note {
  font-size: 0.92rem;
  line-height: 1.6;
}

.sqrt-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.sqrt-steps-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.sqrt-step-no {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e6f6eb;
  color: #2f8f57;
  font-weight: 900;
}

.sqrt-bottom-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sqrt-bottom-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--sqrt-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243, 250, 246, 0.94));
}

.sqrt-section-head {
  margin-bottom: 14px;
}

.sqrt-section-head h2 {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.12;
  color: #204733;
}

.sqrt-section-head p {
  margin: 6px 0 0;
  color: var(--sqrt-ink-soft);
  line-height: 1.6;
}

.sqrt-trust-card h3,
.sqrt-mini-card h3,
.sqrt-formula-card h3,
.sqrt-related-card h3,
.sqrt-reference-item a,
.sqrt-faq summary {
  margin: 0;
}

.sqrt-trust-card h3,
.sqrt-mini-card h3,
.sqrt-formula-card h3,
.sqrt-related-card h3 {
  font-size: 1rem;
  color: #234734;
}

.sqrt-formula {
  margin: 12px 0 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f3faf5;
  border: 1px solid var(--sqrt-line);
  font-weight: 900;
  font-size: 1.04rem;
  color: #2f8f57;
  overflow-wrap: anywhere;
}

.sqrt-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  border: 1px solid var(--sqrt-line);
  background: rgba(255,255,255,0.78);
}

.sqrt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.sqrt-table th,
.sqrt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sqrt-line);
  text-align: left;
  vertical-align: top;
  color: var(--sqrt-ink-soft);
  overflow-wrap: anywhere;
}

.sqrt-table th {
  background: #edf8f0;
  color: #234734;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sqrt-table tbody tr:nth-child(even) td {
  background: rgba(245, 251, 247, 0.72);
}

.sqrt-table tbody tr:last-child td {
  border-bottom: 0;
}

.sqrt-faq-list,
.sqrt-reference-list {
  display: grid;
  gap: 12px;
}

.sqrt-faq {
  border: 1px solid var(--sqrt-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  overflow: hidden;
}

.sqrt-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  color: #234734;
}

.sqrt-faq summary::-webkit-details-marker {
  display: none;
}

.sqrt-faq-body {
  padding: 0 18px 18px;
  line-height: 1.6;
}

.sqrt-reference-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--sqrt-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}

.sqrt-reference-item a,
.sqrt-related-card a {
  color: #2f8f57;
  font-weight: 800;
  text-decoration: none;
}

.sqrt-reference-item a:hover,
.sqrt-related-card a:hover,
.sqrt-quick-links a:hover {
  text-decoration: underline;
}

.sqrt-related-card p,
.sqrt-mini-card p,
.sqrt-trust-card p,
.sqrt-formula-card p,
.sqrt-prose p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.sqrt-hidden-advanced {
  display: none !important;
}

@media (max-width: 1024px) {
  .sqrt-result-grid,
  .sqrt-trust-grid,
  .sqrt-card-grid,
  .sqrt-formula-grid,
  .sqrt-related-grid,
  .sqrt-bottom-notes {
    grid-template-columns: 1fr;
  }

  .sqrt-calculator-head,
  .sqrt-topbar {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .sqrt-hero {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .sqrt-hero-icon {
    width: 74px;
    border-radius: 18px;
  }

  .sqrt-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .sqrt-swap {
    width: 52px;
    height: 52px;
    transform: rotate(90deg);
  }

  .sqrt-swap:hover,
  .sqrt-swap:focus-visible {
    transform: rotate(90deg) translateY(-1px);
  }
}

@media (max-width: 640px) {
  .sqrt-wrap {
    border-radius: 24px;
    padding: 12px;
  }

  .sqrt-calculator-head,
  .sqrt-shell-body,
  .sqrt-accordion-panel,
  .sqrt-content-card,
  .sqrt-accordion-toggle {
    padding: 14px;
  }

  .sqrt-hero {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .sqrt-hero-icon {
    width: 64px;
  }

  .sqrt-badge,
  .sqrt-quick-links a,
  .sqrt-example-pill {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .sqrt-io-card {
    grid-template-columns: 1fr;
  }

  .sqrt-io-left {
    border-right: 0;
    border-bottom: 1px solid var(--sqrt-line);
  }

  .sqrt-info-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sqrt-reference-item {
    align-items: start;
    flex-direction: column;
  }
}
