/* Guardrails Withdrawal Strategy Calculator (UK): STAX shell (coral / mint) */

.gws-app,
.gws-app * {
  box-sizing: border-box;
}

.gws-loading,
.gws-fatal,
.gws-err {
  margin: 12px 0;
  font-weight: 650;
  color: #5b6472;
}
.gws-err,
.gws-fatal {
  color: #e11d48;
  font-weight: 700;
}

#gws-root.gws-app,
.gws-root.gws-app {
  --gws-ink: #0b1220;
  --gws-muted: #4b5563;
  --gws-line: #e6eaf0;
  --gws-soft: #f5f7fb;
  --gws-coral: #ff4d3d;
  --gws-coral-deep: #e23a2b;
  --gws-mint: #12b886;
  --gws-mint-deep: #0ca678;
  --gws-sky: #3b82f6;
  --gws-text: 1.05rem;
  --gws-text-sm: 0.95rem;
  --gws-text-xs: 0.88rem;
  width: 100%;
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 12px 8px;
  overflow-x: clip;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--gws-ink);
  font-size: var(--gws-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.gws-shell {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  margin: 0 auto 28px;
  padding: 22px 20px 28px;
  border: 1px solid var(--gws-line);
  border-radius: 28px;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(255, 77, 61, 0.12), transparent 55%),
    radial-gradient(900px 380px at 95% 0%, rgba(18, 184, 134, 0.12), transparent 50%),
    #fff;
  box-shadow: 0 20px 50px rgba(11, 18, 32, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gws-head {
  border: none;
  border-radius: 22px;
  padding: 26px 24px 24px;
  background: linear-gradient(145deg, #0b1220 0%, #152038 55%, #12352f 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.gws-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 61, 0.35), transparent 68%);
  pointer-events: none;
}
.gws-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fda4a0;
  position: relative;
  z-index: 1;
}
.gws-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.12;
  position: relative;
  z-index: 1;
}
.gws-lead {
  margin: 0;
  max-width: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 550;
  font-size: 1.05rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.gws-panel {
  border: 1px solid var(--gws-line);
  border-radius: 22px;
  padding: 22px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.04);
}
.gws-panel--soft {
  background: linear-gradient(180deg, #fffaf9 0%, #fff 40%);
}

.gws-section-badge {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffe8e5;
  color: var(--gws-coral-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gws-section-title {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 900;
  color: var(--gws-ink);
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.gws-section-help {
  margin: 10px 0 18px;
  max-width: none;
  width: 100%;
  font-size: 1rem;
  color: var(--gws-muted);
  line-height: 1.6;
  font-weight: 550;
}
.gws-section-help--tight {
  margin-bottom: 12px;
}

.gws-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.gws-pill {
  appearance: none;
  border: 1.5px solid #ffd5cf;
  background: #fff;
  color: var(--gws-ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.gws-pill:hover {
  border-color: #ff8b80;
}
.gws-pill[aria-pressed="true"] {
  background: var(--gws-ink);
  border-color: var(--gws-ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 18, 32, 0.18);
}

.gws-switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 14px;
}
.gws-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: background .18s;
}
.gws-switch[aria-checked="true"] {
  background: var(--gws-mint);
}
.gws-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(11,18,32,.2);
  transition: left .18s;
}
.gws-switch[aria-checked="true"] .gws-switch__knob {
  left: 23px;
}
.gws-switch-copy {
  flex: 1;
  min-width: 0;
}
.gws-switch-copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gws-ink);
  margin: 0 0 4px;
}
.gws-switch-copy span {
  display: block;
  font-size: 0.88rem;
  color: var(--gws-muted);
  line-height: 1.45;
  font-weight: 550;
}

.gws-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.gws-fields--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .gws-fields,
  .gws-fields--2 {
    grid-template-columns: 1fr;
  }
}

.gws-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: var(--gws-soft);
  border: 1px solid transparent;
  min-width: 0;
}
.gws-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2937;
}
.gws-hint {
  margin: 0;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.4;
  font-weight: 500;
}
.gws-input {
  width: 100%;
  border: 1px solid #d7dde8;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 1rem;
  font-weight: 650;
  min-height: 44px;
  background: #fff;
  color: var(--gws-ink);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.gws-input:focus {
  outline: 2px solid rgba(255, 77, 61, 0.45);
  outline-offset: 1px;
  border-color: #ff8b80;
}

.gws-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #9a3412;
  font-weight: 600;
}
.gws-note--mint {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.gws-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.gws-hero {
  margin: 0;
  border-radius: 22px;
  padding: 22px 20px 24px;
  border: 1px solid #ffc7c1;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(255,77,61,.12), transparent 55%),
    radial-gradient(700px 260px at 100% 0%, rgba(18,184,134,.12), transparent 50%),
    linear-gradient(180deg, #fffaf9 0%, #fff 60%);
  box-shadow: 0 12px 32px rgba(11,18,32,.06);
  text-align: center;
}
.gws-hero__kicker {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gws-coral-deep);
}
.gws-hero__value {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 0.85rem + 3.2vw, 2.5rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--gws-ink);
}
.gws-hero__line {
  margin: 0 auto 10px;
  max-width: 52ch;
  font-size: 1.05rem;
  font-weight: 750;
  color: #1f2937;
  line-height: 1.45;
}
.gws-hero__sub {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #4b5563;
  font-weight: 550;
}

.gws-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 700px) {
  .gws-stat-grid {
    grid-template-columns: 1fr;
  }
}
.gws-stat {
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: var(--gws-soft);
  border: 1px solid #eef1f6;
  text-align: left;
}
.gws-stat__kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gws-coral-deep);
}
.gws-stat__value {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gws-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gws-stat__hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--gws-muted);
  font-weight: 550;
  line-height: 1.4;
}

.gws-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gws-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef1f6;
  font-weight: 600;
  color: #374151;
}
.gws-breakdown li strong {
  font-weight: 850;
  color: var(--gws-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gws-breakdown li.is-total {
  background: #fff5f3;
  border-color: #ffd5cf;
  font-weight: 800;
}
.gws-breakdown li.is-mint {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.gws-breakdown li.is-ruin {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.gws-disclaimer {
  margin: 0;
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.5;
  font-weight: 550;
}

.gws-table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid #eef1f6;
}
.gws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  min-width: 760px;
}
.gws-table th,
.gws-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #eef1f6;
  white-space: nowrap;
}
.gws-table th:first-child,
.gws-table td:first-child,
.gws-table th:last-child,
.gws-table td:last-child {
  text-align: left;
}
.gws-table thead th {
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.gws-table tbody tr.is-raise {
  background: #f0fdf4;
}
.gws-table tbody tr.is-cut {
  background: #fff7ed;
}
.gws-table tbody tr.is-ruin {
  background: #fff1f2;
}
.gws-event-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}
.gws-event-chip.is-raise {
  background: #d1fae5;
  color: #047857;
}
.gws-event-chip.is-cut {
  background: #ffedd5;
  color: #c2410c;
}
.gws-event-chip.is-ruin {
  background: #fecdd3;
  color: #9f1239;
}
.gws-path-toggle {
  margin-top: 12px;
  appearance: none;
  border: 1.5px solid #ffd5cf;
  background: #fff;
  color: var(--gws-ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.gws-path-toggle:hover {
  border-color: #ff8b80;
}

.gws-app .gws-export {
  margin-top: 4px;
  padding: 0;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #0b1220 0%, #1a2744 55%, #12352f 100%) !important;
  box-shadow: 0 18px 40px rgba(11, 18, 32, 0.22);
  overflow: hidden;
  color: #fff !important;
}
.gws-export-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px 20px;
  align-items: center;
}
@media (max-width: 820px) {
  .gws-export-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}
.gws-export-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff6b5c, var(--gws-coral));
  color: #fff;
  font-weight: 950;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.06em;
}
.gws-export-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 950;
  color: #fff;
  letter-spacing: -0.02em;
}
.gws-export-lead {
  margin: 0 0 10px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.8);
}
.gws-export-includes {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 550;
  font-size: 0.9rem;
}
.gws-export-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}
.gws-app button.gws-export-btn {
  min-height: 54px;
  padding: 14px 22px !important;
  font-weight: 950 !important;
  font-size: 1rem !important;
  font-family: inherit;
  background: linear-gradient(180deg, #ff6b5c 0%, var(--gws-coral) 100%) !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(255, 77, 61, 0.4) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  cursor: pointer;
}
.gws-app button.gws-export-btn:hover,
.gws-app button.gws-export-btn:focus {
  filter: brightness(1.05);
}

.gws-assumptions {
  margin-top: 4px;
}
.gws-assumptions__list {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 550;
}
.gws-subtitle {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--gws-ink);
}

.gws-inline-link {
  color: var(--gws-coral-deep);
  font-weight: 750;
  text-underline-offset: 2px;
}

.gws-viz-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gws-coral-deep);
}

.gws-chart {
  min-width: 0;
}
.gws-chart__plot {
  position: relative;
  min-width: 0;
}
.gws-chart__frame {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 200px;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 16px;
  overflow: hidden;
  cursor: crosshair;
}
.gws-chart__frame:focus {
  outline: 2px solid rgba(255, 77, 61, 0.45);
  outline-offset: 1px;
}
.gws-chart__svg {
  width: 100%;
  height: 100%;
  display: block;
}
.gws-chart__lane {
  fill: rgba(18, 184, 134, 0.12);
}
.gws-chart__pot {
  stroke: #0b1220;
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.gws-chart__rail {
  stroke-width: 1.75;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.gws-chart__rail--raise {
  stroke: #12b886;
}
.gws-chart__rail--cut {
  stroke: #ff4d3d;
}
.gws-chart__pt {
  fill: #0b1220;
  pointer-events: none;
}
.gws-chart__pt.is-step {
  fill: #0b1220;
  stroke: #fff;
  stroke-width: 1.25;
}
.gws-chart__guide {
  stroke: #0b1220;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.35;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.gws-chart__focus {
  fill: var(--gws-coral);
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.gws-chart__ylab {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06);
  white-space: nowrap;
}
.gws-chart__ylab--raise {
  color: #0ca678;
}
.gws-chart__ylab--cut {
  color: #e23a2b;
}
.gws-chart__tip {
  position: absolute;
  z-index: 4;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0b1220;
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 18, 32, 0.22);
  pointer-events: none;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 550;
}
.gws-chart__tip[hidden] {
  display: none !important;
}
.gws-chart__tip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}
.gws-chart__tip-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fda4a0 !important;
  margin-bottom: 4px !important;
}
.gws-chart__tip-main {
  font-size: 0.95rem;
  font-weight: 800 !important;
  color: #fff !important;
  margin-bottom: 4px !important;
}
@media (max-width: 640px) {
  .gws-chart__tip {
    font-size: 0.75rem;
    padding: 8px 10px;
  }
  .gws-chart__ylab {
    font-size: 0.62rem;
    padding: 1px 6px;
  }
}
.gws-chart__axis-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
}
.gws-chart__keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 650;
  color: #374151;
}
.gws-chart__keys span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gws-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}
.gws-swatch--navy { background: #0b1220; }
.gws-swatch--mint { background: #12b886; }
.gws-swatch--coral { background: #ff4d3d; }
.gws-chart__hint {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--gws-muted);
  font-weight: 550;
  line-height: 1.45;
}

.gws-compare {
  min-width: 0;
}
.gws-compare__lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--gws-muted);
  font-weight: 550;
  line-height: 1.5;
}
.gws-compare__table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid #eef1f6;
}
.gws-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 0;
}
.gws-compare__table th,
.gws-compare__table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #eef1f6;
  font-variant-numeric: tabular-nums;
}
.gws-compare__table th:first-child,
.gws-compare__table td:first-child {
  text-align: left;
  font-weight: 750;
  color: #374151;
  white-space: normal;
}
.gws-compare__table thead th {
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}
.gws-compare__table td {
  font-weight: 800;
  color: var(--gws-ink);
  white-space: nowrap;
}
.gws-compare__table tbody tr:last-child th,
.gws-compare__table tbody tr:last-child td {
  border-bottom: none;
}
@media (max-width: 640px) {
  .gws-compare__table th,
  .gws-compare__table td {
    padding: 8px 6px;
    font-size: 0.82rem;
  }
  .gws-compare__table thead th {
    white-space: normal;
  }
}
.gws-compare__note {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--gws-muted);
  font-weight: 550;
  line-height: 1.45;
}

.gws-table tbody tr.gws-table__gap td {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 650;
  color: #6b7280;
  background: #f8fafc;
  white-space: normal;
}
