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

.rope-calculator-section {
  padding: 72px 20px;
  background:
    radial-gradient(circle at top right, rgba(184, 115, 51, 0.16), transparent 30%),
    linear-gradient(180deg, #111822 0%, #0d141b 100%);
  color: #f5f7fa;
}

.rope-calculator-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.rope-calculator-header {
  margin-bottom: 32px;
}

.rope-calculator-header h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.2;
}

.rope-calculator-header p {
  margin: 0;
  max-width: 760px;
  color: #d4dbe2;
  line-height: 1.65;
}

.rope-calculator-form,
.calculator-results {
  background: linear-gradient(180deg, #16202b 0%, #131d28 100%);
  border: 1px solid rgba(184, 115, 51, 0.28);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 700;
  margin-bottom: 8px;
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"] {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #08111a;
  color: #ffffff;
  font-size: 1rem;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
  outline: none;
  border-color: rgba(210, 138, 71, 0.9);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.18);
}

.form-group small {
  margin-top: 8px;
  color: #aeb9c5;
  line-height: 1.5;
}

.snubber-group {
  justify-content: flex-start;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-slider {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #0a121b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f5f7fa;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(180deg, #c98544 0%, #b87333 100%);
  border-color: rgba(210, 138, 71, 0.95);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.18);
}

.toggle-text {
  color: #f5f7fa;
  line-height: 1.4;
}

.custom-fields {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(184, 115, 51, 0.22);
}

.custom-fields h3 {
  margin: 0 0 18px;
}

.calculator-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn-calc-primary,
.btn-calc-secondary {
  appearance: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-calc-primary {
  background: linear-gradient(180deg, #d28a47 0%, #b87333 100%);
  color: #fff;
  border: 2px solid rgba(230, 165, 96, 0.9);
  box-shadow: 0 8px 18px rgba(184, 115, 51, 0.22);
}

.btn-calc-primary:hover {
  transform: translateY(-1px);
}

.btn-calc-secondary {
  background: transparent;
  color: #f5f7fa;
  border: 2px solid #5d7186;
}

.btn-calc-secondary:hover {
  border-color: #8aa0b7;
}

.calculator-results {
  margin-top: 30px;
}

.securement-summary {
  margin: 18px 0 24px;
}

.securement-card {
  padding: 22px;
  background: linear-gradient(180deg, #1a2734 0%, #14202b 100%);
  border: 1px solid rgba(184, 115, 51, 0.28);
  border-radius: 16px;
  color: #e6edf4;
}

.securement-card__eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dca264;
  margin-bottom: 10px;
}

.securement-card__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.securement-card__main {
  min-width: 260px;
  flex: 1 1 360px;
}

.securement-card__main h4 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.securement-card__main p {
  margin: 0;
  line-height: 1.65;
  color: #d5dde5;
}

.securement-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.securement-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(8, 17, 26, 0.92);
  border: 1px solid rgba(184, 115, 51, 0.24);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
}

.securement-card__note {
  margin: 14px 0 0;
  color: #c7d2dc;
  line-height: 1.6;
}

.securement-card .btn-calc-primary {
  margin-top: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 24px;
}

.summary-grid--single {
  grid-template-columns: 1fr;
}

.inputs-summary,
.buffer-summary {
  min-height: 100%;
  padding: 20px 20px;
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.18);
  border-radius: 14px;
  color: #dce4eb;
  line-height: 1.7;
}

.rope-results-content {
  display: block;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.result-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.result-card {
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.18);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.result-card h4 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}

.result-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  line-height: 1.55;
}

.result-line:last-child {
  margin-bottom: 0;
}

.result-label {
  color: #cfd8e0;
  font-weight: 700;
}

.result-value {
  display: block;
  color: #ffffff;
  font-size: 1.04rem;
  line-height: 1.6;
}

.results-note,
.results-disclaimer {
  margin-top: 18px;
  color: #b9c4cf;
  line-height: 1.7;
}

.tension-card {
  background: rgba(9, 17, 26, 0.9);
  border: 1px solid rgba(184, 115, 51, 0.16);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tension-card__header {
  margin-bottom: 14px;
}

.tension-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  color: #f5f7fa;
}

.tension-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tension-card__grid--single {
  grid-template-columns: 1fr;
}

.tension-card__metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 14px;
}

.tension-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 6px;
}

.tension-card__value {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
}

.tension-card__section {
  margin-bottom: 14px;
}

.tension-card__bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 8px;
}

.tension-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-radius: 999px;
  overflow: hidden;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tension-bar__zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.tension-bar__zone--loose,
.tension-bar__zone--tight {
  background: #7a1f1f;
  color: #fff2f2;
}

.tension-bar__zone--sweet {
  background: #1f6a3a;
  color: #f1fff6;
}

.tension-bar__scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.tension-bar__scale-item {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.tension-card__instruction {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.tension-card__disclosure {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.tension-card__note {
  margin: 8px 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #d7e7ff;
}

.tension-card__warning {
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255, 184, 77, 0.12);
  border: 1px solid rgba(255, 184, 77, 0.35);
  color: #ffe4b3;
  font-size: 0.83rem;
  line-height: 1.45;
}

.tension-card__warning--static {
  margin-top: 2px;
}

.tension-card--warning .tension-card__title {
  color: #fff4dc;
}

.tension-card--caution {
  border-color: rgba(255, 184, 77, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 184, 77, 0.08) inset;
}

.hidden,
[hidden] {
  display: none !important;
}

.pdf-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-start;
}

.securement-summary {
  margin-bottom: 22px;
}

.securement-card {
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.22);
  border-radius: 16px;
  padding: 22px;
}

.securement-card__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d28a47;
  margin-bottom: 10px;
}

.securement-card__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.securement-card__main {
  flex: 1 1 320px;
}

.securement-card__main h4 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #ffffff;
}

.securement-card__main p {
  margin: 0;
  color: #dce4eb;
  line-height: 1.65;
}

.securement-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: flex-start;
}

.securement-pill {
  background: rgba(184, 115, 51, 0.12);
  border: 1px solid rgba(184, 115, 51, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  color: #f5f7fa;
  font-weight: 700;
  line-height: 1.3;
}

.securement-card__note {
  margin: 14px 0 0;
  color: #d4dbe2;
  line-height: 1.6;
}

.securement-card .btn-calc-primary {
  margin-top: 18px;
}

.summary-grid--single {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .calculator-grid,
  .summary-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .rope-calculator-form,
  .calculator-results {
    padding: 22px;
  }

  .form-group.full-width {
    grid-column: auto;
  }

  .tension-card__grid {
    grid-template-columns: 1fr;
  }

  .securement-card__content {
    flex-direction: column;
  }

  .securement-pills {
    width: 100%;
  }
}

.tie-down-diagram-card {
  margin-top: 30px;
  background: linear-gradient(180deg, #16202b 0%, #131d28 100%);
  border: 1px solid rgba(184, 115, 51, 0.28);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.tie-down-diagram-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.tie-down-diagram-header h3 {
  margin: 0 0 8px;
  color: #ffffff;
}

.tie-down-diagram-header p {
  margin: 0;
  color: #d4dbe2;
  line-height: 1.6;
}

.tie-down-diagram-meta {
  flex: 0 0 auto;
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  color: #f5f7fa;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tie-down-diagram-wrap {
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.18);
  border-radius: 16px;
  overflow: hidden;
}

.tie-down-coordinate-svg {
  display: block;
  width: 100%;
  min-height: 360px;
}

.diagram-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.diagram-axis-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
}

.diagram-rope-line {
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.diagram-anchor-dot {
  fill: #d03434;
  stroke: #ffffff;
  stroke-width: 2;
}

.diagram-aircraft-dot {
  fill: #33b86b;
  stroke: #ffffff;
  stroke-width: 2;
}

.diagram-point-label {
  fill: #f5f7fa;
  font-size: 13px;
  font-weight: 700;
}

.diagram-coordinate-label {
  fill: #aeb9c5;
  font-size: 11px;
}

.diagram-aircraft-centerline {
  stroke: rgba(51, 184, 107, 0.65);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.diagram-anchor-line {
  stroke: rgba(208, 52, 52, 0.55);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.diagram-wing-ring-line {
  stroke: rgba(51, 184, 107, 0.65);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.tie-down-diagram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  color: #d4dbe2;
  font-size: 0.9rem;
}

.tie-down-diagram-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.legend-dot--anchor {
  background: #d03434;
}

.legend-dot--aircraft {
  background: #33b86b;
}

.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  border-top: 3px dashed #ffffff;
}

@media (max-width: 900px) {
  .tie-down-diagram-header {
    flex-direction: column;
  }

  .tie-down-diagram-meta {
    white-space: normal;
  }

  .tie-down-coordinate-svg {
    min-height: 300px;
  }
}

.wingtip-diagrams-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.wingtip-diagram-card {
  background: linear-gradient(180deg, #16202b 0%, #131d28 100%);
  border: 1px solid rgba(184, 115, 51, 0.28);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.wingtip-diagram-header {
  margin-bottom: 14px;
}

.wingtip-diagram-header h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 1.05rem;
}

.wingtip-diagram-header p {
  margin: 0 0 10px;
  color: #d4dbe2;
  line-height: 1.55;
  font-size: 0.92rem;
}

.wingtip-diagram-meta {
  display: inline-block;
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: #f5f7fa;
  font-weight: 700;
  font-size: 0.82rem;
}

.wingtip-diagram-wrap {
  background: #08111a;
  border: 1px solid rgba(184, 115, 51, 0.18);
  border-radius: 15px;
  overflow: hidden;
}

.wingtip-coordinate-svg {
  display: block;
  width: 100%;
  min-height: 300px;
}

.diagram-ramp-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 2;
}

.diagram-height-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.diagram-angle-label {
  fill: #dff5e8;
  font-size: 12px;
  font-weight: 700;
}

.diagram-side-axis-label {
  fill: #a7d8ff;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .wingtip-diagrams-grid {
    grid-template-columns: 1fr;
  }

  .wingtip-coordinate-svg {
    min-height: 280px;
  }
}

.rope-calculator-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 30px;
}

.calculator-video-card--hero {
  margin: 0;
}

.calculator-video-card--hero h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.15rem;
}

.calculator-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #08111a;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(184, 115, 51, 0.28);
}

.calculator-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .rope-calculator-hero {
    grid-template-columns: 1fr;
  }
}
