.whipsaw-guide {
  --ws-bg: #020617;
  --ws-panel: #0a1628;
  --ws-panel-2: #0d1b30;
  --ws-border: rgba(148, 163, 184, 0.2);
  --ws-text: #f8fafc;
  --ws-muted: #aab5c5;
  --ws-amber: #f6c75a;
  --ws-cyan: #54d3ff;
  --ws-green: #4ade80;
  --ws-red: #fb7185;
  color: var(--ws-text);
  max-width: 1120px;
}

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

.whipsaw-guide a {
  color: #78dcff;
  text-underline-offset: 0.2em;
}

.whipsaw-guide p,
.whipsaw-guide li,
.whipsaw-guide dd {
  color: var(--ws-muted);
}

.whipsaw-guide h1,
.whipsaw-guide h2,
.whipsaw-guide h3,
.whipsaw-guide strong {
  color: var(--ws-text);
}

.ws-kicker {
  margin: 0 0 0.85rem;
  color: var(--ws-amber) !important;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ws-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: clamp(2rem, 5vw, 4.4rem);
  align-items: center;
  min-height: 650px;
  padding: clamp(2rem, 5vw, 4.35rem);
  overflow: hidden;
  border: 1px solid rgba(246, 199, 90, 0.24);
  border-radius: 1.65rem;
  background:
    radial-gradient(circle at 10% 15%, rgba(246, 199, 90, 0.14), transparent 34%),
    radial-gradient(circle at 91% 42%, rgba(84, 211, 255, 0.13), transparent 34%),
    linear-gradient(145deg, #111728 0%, #091325 54%, #050d1a 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.ws-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.ws-hero-copy,
.ws-hero-figure {
  position: relative;
  z-index: 1;
}

.ws-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 5.2vw, 5.25rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.ws-byline {
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.ws-byline a {
  color: var(--ws-text);
  font-weight: 850;
  text-decoration: none;
}

.ws-hero-lede {
  max-width: 690px;
  margin: 1.6rem 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.ws-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.8rem;
}

.ws-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  color: #171102 !important;
  background: linear-gradient(135deg, #ffe08a, #f2b93d);
  box-shadow: 0 12px 30px rgba(246, 199, 90, 0.22);
  font-weight: 850;
  text-decoration: none;
}

.ws-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ws-text-link {
  font-weight: 750;
  text-decoration: none;
}

.ws-text-link::after {
  content: " \2192";
}

.ws-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.ws-hero-facts div {
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.95rem;
  background: rgba(2, 6, 23, 0.5);
}

.ws-hero-facts span,
.ws-hero-facts strong {
  display: block;
}

.ws-hero-facts span {
  margin-bottom: 0.35rem;
  color: #8793a8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ws-hero-facts strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.ws-hero-figure {
  margin: 0;
  padding: 0.65rem;
  border: 1px solid rgba(84, 211, 255, 0.24);
  border-radius: 1.35rem;
  background: rgba(2, 6, 23, 0.62);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.ws-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.95rem;
}

.ws-hero-figure figcaption {
  padding: 0.8rem 0.45rem 0.35rem;
  color: #8796ad;
  font-size: 0.78rem;
  line-height: 1.5;
}

.ws-on-page {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ws-border);
  border-radius: 1rem;
  background: rgba(10, 22, 40, 0.88);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.ws-on-page > span {
  margin-right: 0.15rem;
  color: var(--ws-amber);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ws-on-page a {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  color: #bdc8d8;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.ws-on-page a:hover {
  color: white;
  background: rgba(84, 211, 255, 0.1);
}

.ws-section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  scroll-margin-top: 5.5rem;
}

.ws-section-heading {
  max-width: 800px;
  margin-bottom: 2rem;
}

.whipsaw-guide .ws-section h2,
.ws-sources h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.ws-section-heading > p:last-child {
  margin: 1rem 0 0;
  font-size: 1.04rem;
  line-height: 1.75;
}

.ws-principle {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 6rem);
}

.ws-principle > div:last-child {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-left: 3px solid var(--ws-amber);
  border-radius: 0 1.1rem 1.1rem 0;
  background: linear-gradient(90deg, rgba(246, 199, 90, 0.09), transparent);
}

.ws-principle p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

.ws-principle p + p {
  margin-top: 1rem;
}

.ws-definition-grid,
.ws-condition-grid,
.ws-order-grid,
.ws-mistakes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ws-definition-grid article,
.ws-condition-grid article,
.ws-evidence-grid article,
.ws-order-grid article,
.ws-mistakes article {
  border: 1px solid var(--ws-border);
  border-radius: 1.2rem;
  background: linear-gradient(145deg, rgba(13, 27, 48, 0.94), rgba(7, 17, 32, 0.94));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.ws-definition-grid article,
.ws-condition-grid article {
  min-height: 220px;
  padding: 1.4rem;
}

.ws-definition-grid span,
.ws-evidence-grid > article > span,
.ws-order-grid span {
  color: var(--ws-amber);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ws-definition-grid h3,
.ws-condition-grid h3,
.ws-evidence-grid h3,
.ws-order-grid h3 {
  margin: 0.65rem 0 0;
  font-size: 1.18rem;
  line-height: 1.3;
}

.ws-definition-grid p,
.ws-condition-grid p,
.ws-order-grid p {
  margin: 0.8rem 0 0;
  line-height: 1.7;
}

.ws-inline-note,
.ws-boundary,
.ws-source-note,
.ws-lab-note {
  margin-top: 1.25rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(84, 211, 255, 0.25);
  border-radius: 1rem;
  background: rgba(84, 211, 255, 0.055);
  color: var(--ws-muted);
  line-height: 1.7;
}

.ws-boundary {
  border-color: rgba(246, 199, 90, 0.3);
  background: rgba(246, 199, 90, 0.06);
}

.ws-inline-note strong,
.ws-boundary strong,
.ws-source-note strong,
.ws-lab-note strong {
  color: var(--ws-text);
}

.ws-boundary p,
.ws-source-note p,
.ws-lab-note p {
  margin: 0.35rem 0 0;
}

.ws-condition-grid article > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(246, 199, 90, 0.35);
  border-radius: 50%;
  color: var(--ws-amber);
  font-size: 0.72rem;
  font-weight: 850;
}

.ws-playbook {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-playbook li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ws-playbook li > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(246, 199, 90, 0.36);
  border-radius: 50%;
  color: var(--ws-amber);
  font-size: 0.75rem;
  font-weight: 850;
}

.ws-playbook h3 {
  margin: 0;
  font-size: 1.2rem;
}

.ws-playbook p {
  margin: 0.55rem 0 0;
  line-height: 1.75;
}

.ws-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ws-evidence-grid article {
  padding: 1.5rem;
}

.ws-evidence-grid article.is-acceptance {
  border-color: rgba(74, 222, 128, 0.28);
  background: linear-gradient(145deg, rgba(8, 40, 37, 0.82), rgba(7, 17, 32, 0.94));
}

.ws-evidence-grid article.is-rejection {
  border-color: rgba(251, 113, 133, 0.28);
  background: linear-gradient(145deg, rgba(48, 20, 34, 0.82), rgba(7, 17, 32, 0.94));
}

.ws-evidence-grid .is-acceptance > span {
  color: var(--ws-green);
}

.ws-evidence-grid .is-rejection > span {
  color: #fda4af;
}

.ws-evidence-grid ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.ws-evidence-grid li {
  line-height: 1.65;
}

.ws-lab-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
  gap: 1rem;
  align-items: start;
}

.ws-lab-form,
.ws-lab-results {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--ws-border);
  border-radius: 1.35rem;
  background: linear-gradient(150deg, #0c1b30, #06101f);
}

.ws-lab-form {
  display: grid;
  gap: 1.2rem;
}

.ws-lab-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
}

.ws-lab-form fieldset:first-of-type .ws-field:last-of-type {
  grid-column: 1 / -1;
}

.ws-lab-form legend {
  padding: 0 0.5rem;
  color: var(--ws-amber);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ws-field label {
  display: block;
  margin-bottom: 0.45rem;
  color: #dbe3ee;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
}

.ws-field input,
.ws-field select {
  width: 100%;
  min-height: 48px;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.72rem;
  outline: 0;
  color: #f8fafc;
  background: #06101e;
  font: inherit;
  font-weight: 650;
}

.ws-field select {
  color-scheme: dark;
}

.ws-field input:focus,
.ws-field select:focus {
  border-color: var(--ws-amber);
  box-shadow: 0 0 0 3px rgba(246, 199, 90, 0.15);
}

.ws-input-suffix,
.ws-input-prefix {
  position: relative;
}

.ws-input-suffix input {
  padding-right: 3.8rem;
}

.ws-input-prefix input {
  padding-left: 2rem;
}

.ws-input-suffix span,
.ws-input-prefix span {
  position: absolute;
  top: 50%;
  color: #8493a7;
  font-weight: 800;
  transform: translateY(-50%);
  pointer-events: none;
}

.ws-input-suffix span {
  right: 0.8rem;
}

.ws-input-prefix span {
  left: 0.8rem;
}

.ws-field-help {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.8rem;
  border-radius: 0.75rem;
  background: rgba(246, 199, 90, 0.06);
  font-size: 0.78rem;
  line-height: 1.55;
}

.ws-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ws-actions button {
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #eef4fa;
  background: #10243a;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.ws-actions button:first-child {
  border-color: transparent;
  color: #171102;
  background: var(--ws-amber);
}

.ws-actions button:hover {
  filter: brightness(1.08);
}

.ws-button:focus-visible,
.ws-actions button:focus-visible,
.ws-on-page a:focus-visible,
.ws-text-link:focus-visible,
.whipsaw-guide a:focus-visible,
.whipsaw-guide summary:focus-visible,
.ws-table-scroll:focus-visible {
  outline: 3px solid var(--ws-cyan);
  outline-offset: 3px;
}

.ws-lab-results {
  position: sticky;
  top: 5.5rem;
}

.ws-results-heading > span {
  color: var(--ws-amber);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ws-results-heading h3 {
  margin: 0.55rem 0 0;
  font-size: 1.45rem;
  line-height: 1.25;
}

.ws-lab-results dl {
  display: grid;
  gap: 0;
  margin: 1.35rem 0 0;
}

.ws-lab-results dl div {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.ws-lab-results dt {
  color: #9eacbe;
  font-size: 0.86rem;
}

.ws-lab-results dd {
  margin: 0;
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ws-result-status {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.95rem;
  background: rgba(148, 163, 184, 0.06);
}

.ws-result-status strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.04rem;
}

.ws-result-status p {
  margin: 0;
  line-height: 1.65;
}

.ws-result-status.is-ready {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.075);
}

.ws-result-status.is-wait {
  border-color: rgba(84, 211, 255, 0.34);
  background: rgba(84, 211, 255, 0.075);
}

.ws-result-status.is-caution {
  border-color: rgba(246, 199, 90, 0.36);
  background: rgba(246, 199, 90, 0.08);
}

.ws-result-status.is-skip,
.ws-result-status.is-invalid {
  border-color: rgba(251, 113, 133, 0.38);
  background: rgba(251, 113, 133, 0.08);
}

.ws-result-status.is-skip strong,
.ws-result-status.is-invalid strong {
  color: #fda4af;
}

.ws-result-reasons {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
}

.ws-result-reasons li {
  font-size: 0.84rem;
  line-height: 1.55;
}

.ws-order-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-order-grid article {
  padding: 1.4rem;
}

.ws-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--ws-border);
  border-radius: 1.2rem;
  background: #06111f;
  -webkit-overflow-scrolling: touch;
}

.ws-table-scroll table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.ws-table-scroll th,
.ws-table-scroll td {
  padding: 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: top;
  text-align: left;
  line-height: 1.6;
}

.ws-table-scroll thead th {
  color: #bdc8d8;
  background: #0d1b30;
  font-size: 0.73rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ws-table-scroll tbody th {
  color: #f8fafc;
  font-size: 0.92rem;
}

.ws-table-scroll td {
  color: var(--ws-muted);
  font-size: 0.9rem;
}

.ws-table-scroll tr:last-child th,
.ws-table-scroll tr:last-child td {
  border-bottom: 0;
}

.ws-mistakes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-mistakes article {
  padding: 1.25rem;
}

.ws-mistakes strong {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
}

.ws-mistakes p {
  margin: 0.6rem 0 0;
  line-height: 1.65;
}

.ws-checklist {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.ws-checklist > div > p:last-child {
  margin: 1rem 0 0;
  line-height: 1.7;
}

.ws-checklist ul {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-checklist li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ws-border);
  border-radius: 1rem;
  background: rgba(10, 22, 40, 0.76);
}

.ws-checklist li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #171102;
  background: var(--ws-amber);
  font-size: 0.8rem;
  font-weight: 900;
}

.ws-checklist li p {
  margin: 0;
  line-height: 1.6;
}

.ws-faq details {
  border-bottom: 1px solid rgba(148, 163, 184, 0.17);
}

.ws-faq summary {
  padding: 1.25rem 2.5rem 1.25rem 0;
  color: var(--ws-text);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.45;
}

.ws-faq details p {
  max-width: 820px;
  margin: -0.3rem 0 1.25rem;
  line-height: 1.75;
}

.ws-sources {
  padding: clamp(3rem, 6vw, 5rem);
  border: 1px solid rgba(84, 211, 255, 0.22);
  border-radius: 1.4rem;
  background: linear-gradient(145deg, rgba(13, 27, 48, 0.88), rgba(7, 17, 32, 0.88));
}

.ws-sources ul {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
}

.ws-sources li,
.ws-sources > p:last-child {
  line-height: 1.7;
}

.ws-sources > p:last-child {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ws-disclaimer {
  margin-top: 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(246, 199, 90, 0.3);
  border-radius: 1rem;
  background: rgba(246, 199, 90, 0.055);
}

.ws-disclaimer > strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ws-amber);
}

.ws-disclaimer p {
  margin: 0;
  line-height: 1.7;
}

@media (max-width: 930px) {
  .ws-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ws-hero-figure {
    max-width: 680px;
  }

  .ws-definition-grid,
  .ws-condition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ws-lab-shell {
    grid-template-columns: 1fr;
  }

  .ws-lab-results {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .ws-hero {
    padding: 1.35rem;
    border-radius: 1.2rem;
  }

  .ws-hero h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .ws-hero-facts,
  .ws-definition-grid,
  .ws-condition-grid,
  .ws-evidence-grid,
  .ws-order-grid,
  .ws-mistakes,
  .ws-principle,
  .ws-checklist {
    grid-template-columns: 1fr;
  }

  .ws-definition-grid article,
  .ws-condition-grid article {
    min-height: 0;
  }

  .ws-on-page {
    position: relative;
    top: auto;
  }

  .ws-principle > div:last-child {
    border-top: 3px solid var(--ws-amber);
    border-left: 0;
    border-radius: 0 0 1rem 1rem;
    background: linear-gradient(180deg, rgba(246, 199, 90, 0.09), transparent);
  }

  .ws-lab-form fieldset {
    grid-template-columns: 1fr;
  }

  .ws-lab-form fieldset:first-of-type .ws-field:last-of-type,
  .ws-field-help {
    grid-column: auto;
  }

  .ws-playbook li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.8rem;
  }

  .ws-playbook li > span {
    width: 40px;
    height: 40px;
  }

  .ws-sources {
    padding: 1.4rem;
  }
}

@media (max-width: 480px) {
  .ws-hero-actions,
  .ws-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ws-button,
  .ws-actions button {
    width: 100%;
  }

  .ws-hero-facts {
    grid-template-columns: 1fr;
  }

  .ws-lab-results dl div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .ws-lab-results dd {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-button {
    transition: none;
  }
}
