/* XAU Society — Elliott Wave. Independent, page-scoped styles. */
html:has(.ew-page), body:has(.ew-page) { overflow-x: clip; overflow-y: visible; }
.ew-page {
  --ew-gold: #e1bc6c;
  --ew-cream: #f2eee4;
  --ew-muted: #aaa99e;
  --ew-line: rgba(225,188,108,.19);
  --ew-green: #88bda7;
  --ew-red: #ce978a;
  background: #070806;
  color: var(--ew-cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  isolation: isolate;
}
.ew-page *, .ew-page *::before, .ew-page *::after { box-sizing: border-box; }
.ew-page .container { max-width: 1280px; }
.ew-page [hidden] { display: none !important; }
.ew-page h1, .ew-page h2, .ew-page h3, .ew-page h4, .ew-page p { margin-top: 0; }
.ew-page h1, .ew-page h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.14; text-wrap: balance; }
.ew-page h2 { margin-bottom: 21px; font-size: clamp(2.1rem,3.4vw,2.85rem); }
.ew-page h2 em { color: var(--ew-gold); }
.ew-page h3 { margin-bottom: 14px; font-size: 1.3rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.35; }
.ew-page h4 { margin-bottom: 10px; font-size: 1rem; font-weight: 600; line-height: 1.45; }
.ew-page p { margin-bottom: 22px; color: var(--ew-muted); font-size: 1rem; line-height: 1.8; }
.ew-page p:last-child { margin-bottom: 0; }
.ew-page a { text-underline-offset: 5px; }
.ew-page a:hover { color: #f4dca8; }
.ew-page a:focus-visible, .ew-page button:focus-visible, .ew-page summary:focus-visible, .ew-page input:focus-visible { outline: 2px solid var(--ew-gold); outline-offset: 5px; }
.ew-page button { font-family: inherit; cursor: pointer; }
.ew-page button:disabled { opacity: .45; cursor: default; }
.ew-page section[id], .ew-page [id^="ew-"] { scroll-margin-top: 91px; }
.ew-page .ew-kicker { margin: 0 0 18px; color: var(--ew-gold); font-size: .75rem; font-weight: 700; letter-spacing: .18em; line-height: 1.6; text-transform: uppercase; }
.ew-heading-tail { display: block; color: var(--ew-gold); font-style: italic; }
.ew-hero { position: relative; padding: 29px 0 79px; background: radial-gradient(ellipse at 81% 42%,rgba(160,113,35,.12),transparent 50%),#070806; }
.ew-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-bottom: 53px; color: #979a8f; font-size: .8125rem; }
.ew-breadcrumb a { color: #c4c4b9; }
.ew-breadcrumb span:last-child { color: #d8c18b; }
.ew-hero-grid { display: grid; grid-template-columns: .9fr 1.16fr; gap: 55px; align-items: center; }
.ew-hero-copy, .ew-terminal, .ew-chart-panel, .ew-prose, .ew-cycle-visual, .ew-wave-lesson, .ew-rule-copy, .ew-correction-copy, .ew-exercise-copy { min-width: 0; }
.ew-hero-copy h1 { margin-bottom: 27px; font-size: clamp(3rem,4.6vw,4.1rem); line-height: 1.045; }
.ew-page .ew-lead { max-width: 505px; font-size: 1.0625rem; line-height: 1.85; }
.ew-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.ew-page .ew-button { display: inline-flex; align-items: center; justify-content: center; min-height: 49px; gap: 9px; padding: 13px 23px; border: 1px solid var(--ew-gold); border-radius: 6px; color: #19160d; background: var(--ew-gold); font-size: .875rem; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; transition: background .2s,border-color .2s,transform .2s; }
.ew-page .ew-button:hover { color: #19160d; border-color: #efd39a; background: #efd39a; transform: translateY(-2px); }
.ew-page .ew-button-outline { color: #e3d8bc; border-color: #4e4634; background: transparent; }
.ew-page .ew-button-outline:hover { color: #f4e6c5; background: #211e14; border-color: #8c7444; }
.ew-hero-notes { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 26px 0 0; padding: 0; color: #9a9d92; font-size: .8125rem; }
.ew-hero-notes li { display: inline-flex; gap: 8px; align-items: center; }
.ew-hero-notes li::before { content: ''; width: 5px; height: 5px; border: 1px solid #a5905d; transform: rotate(45deg); }
.ew-terminal { position: relative; padding: 23px 22px 0; border: 1px solid #4d442f; border-radius: 16px; background: linear-gradient(140deg,#15170f,#0c1009); box-shadow: 0 25px 80px #0005; }
.ew-terminal::before { content: ''; position: absolute; top: -1px; left: 25px; right: 25px; height: 1px; background: linear-gradient(90deg,transparent,#d5b673,transparent); }
.ew-terminal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #303528; }
.ew-instrument { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; color: #eee7d6; }
.ew-instrument strong { display: block; font-size: .9375rem; line-height: 1.3; letter-spacing: .04em; }
.ew-instrument > span, .ew-instrument small { display: block; color: #a3aa97; font-size: .75rem; line-height: 1.5; }
.ew-chart-meta { color: #9ca58f; font-size: .75rem; line-height: 1.6; text-align: right; }
.ew-chart-meta span, .ew-chart-meta strong { display: block; }
.ew-chart-meta strong { color: #dac38b; font-weight: 500; }
.ew-terminal > .ew-chart { margin-top: 12px; }
.ew-page .ew-hero-caption { padding: 4px 1px 19px; margin: 0; color: #a7b098; font-size: 1rem; line-height: 1.7; }
.ew-page .ew-hero-caption h2 { margin-bottom: 9px; font-family: Arial,Helvetica,sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.5; letter-spacing: -.015em; text-wrap: initial; }
.ew-page .ew-hero-caption p { font-size: 1rem; line-height: 1.75; }
.ew-terminal-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 14px; min-height: 49px; padding: 12px 0; border-top: 1px solid #303528; color: #a5ac96; font-size: .75rem; line-height: 1.5; }
.ew-terminal-footer strong { color: #ddc58a; font-weight: 500; }
.ew-jump-nav { position: sticky; top: 0; z-index: 30; border-top: 1px solid #2b2f22; border-bottom: 1px solid #2b2f22; background: rgba(10,13,8,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.ew-jump-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 64px; }
.ew-jump-links { display: flex; align-items: center; gap: 28px; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #675936 transparent; }
.ew-jump-links a { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 63px; border-bottom: 2px solid transparent; color: #b4bba7; font-size: .875rem; white-space: nowrap; }
.ew-jump-links a:hover, .ew-jump-links a[aria-current="location"] { color: var(--ew-gold); border-bottom-color: var(--ew-gold); }
.ew-motion-button { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 43px; gap: 8px; padding: 8px 12px; border: 1px solid #4e5038; border-radius: 5px; background: #171c10; color: #d8ceb0; font-size: .875rem; line-height: 1.3; }
.ew-motion-button:hover { border-color: #b89b5b; }
.ew-section { padding: 95px 0; }
.ew-section-soft { border-top: 1px solid #252c1d; border-bottom: 1px solid #252c1d; background: #0c1009; }
.ew-section-heading { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: end; margin-bottom: 41px; }
.ew-section-heading h2 { margin-bottom: 0; }
.ew-section-heading > p { margin-bottom: 3px; }
.ew-definition-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: start; gap: 90px; }
.ew-prose > p { max-width: 650px; }
.ew-prose strong { color: #d7dac9; font-weight: 600; }
.ew-principles { display: grid; border-top: 1px solid #454d32; }
.ew-principles article { position: relative; min-width: 0; padding: 24px 0 25px 62px; border-bottom: 1px solid #303a24; }
.ew-principles h3 { margin: 0 0 9px; font-size: 1.0625rem; font-weight: 600; }
.ew-principles p { margin: 0; }
.ew-principle-symbol { position: absolute; left: 0; top: 25px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #5d603b; border-radius: 7px; color: #dbc183; background: #1b2212; font-family: Georgia,serif; font-size: 1.25rem; }
.ew-reading-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 29px; margin-top: 40px; }
.ew-reading-grid article { min-width: 0; padding: 23px 24px 0 0; border-top: 1px solid #495236; border-right: 1px solid #2e3a23; }
.ew-reading-grid article:last-child { border-right: 0; padding-right: 0; }
.ew-reading-grid h3 { color: #dfd6b9; font-size: 1.0625rem; }
.ew-reading-grid p { margin-bottom: 0; }
.ew-note { margin-top: 22px; padding: 18px 21px; border-left: 2px solid #ad9356; background: #1a2112; color: #b5bea5; font-size: 1rem; line-height: 1.8; }
.ew-note p { color: inherit; }
.ew-note strong { color: #e0c98f; }
.ew-source-link { display: inline-flex; align-items: center; min-height: 40px; margin-top: 18px; color: #b8ab7c; font-size: .875rem; text-decoration: underline; }
.ew-chart-panel { padding: 22px; border: 1px solid #3e482e; border-radius: 12px; background: linear-gradient(135deg,#141b0f,#0c1108); }
.ew-chart-panel .ew-chart { margin-inline: auto; }
.ew-page .ew-chart-note { margin: 15px 0 0; padding-top: 16px; border-top: 1px solid #303d24; color: #a6b093; font-size: 1rem; }
.ew-direction-tabs, .ew-rule-tabs, .ew-correction-tabs, .ew-exercise-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ew-direction-tabs button, .ew-rule-tabs button, .ew-correction-tabs button, .ew-exercise-tabs button, .ew-ratio-buttons button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; gap: 8px; padding: 10px 18px; border: 1px solid #424b30; border-radius: 5px; color: #b0bba0; background: #0d1508; font-size: .875rem; font-weight: 500; line-height: 1.4; transition: background .2s,border-color .2s,color .2s; }
.ew-direction-tabs button[aria-selected="true"], .ew-rule-tabs button[aria-selected="true"], .ew-correction-tabs button[aria-selected="true"], .ew-exercise-tabs button[aria-selected="true"], .ew-ratio-buttons button[aria-pressed="true"] { color: #eddaaa; background: #2b2e1a; border-color: #8b7948; }
.ew-direction-tabs button:hover, .ew-rule-tabs button:hover, .ew-correction-tabs button:hover, .ew-exercise-tabs button:hover, .ew-ratio-buttons button:hover { color: #f0e2bf; background: #202718; border-color: #716840; }
.ew-cycle-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.ew-cycle-visual .ew-chart { max-height: 400px; }
.ew-wave-lesson { padding: 26px; border: 1px solid #555437; border-radius: 12px; background: #171e10; }
.ew-wave-tabs { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 5px; margin-bottom: 25px; }
.ew-wave-tabs button { display: grid; place-items: center; min-width: 0; min-height: 44px; padding: 8px 3px; border: 1px solid #505737; border-radius: 5px; color: #bbbd9e; background: #10190a; font-size: .875rem; font-weight: 700; line-height: 1; transition: background .2s,border-color .2s; }
.ew-wave-tabs button[aria-selected="true"] { color: #16190d; background: #e1bc6c; border-color: #e1bc6c; }
.ew-wave-tabs button:hover { border-color: #cfb475; }
.ew-wave-panel h3 { margin-bottom: 13px; font-family: Georgia,serif; font-size: 1.75rem; font-weight: 400; }
.ew-wave-panel p { margin-bottom: 19px; }
.ew-key-points { padding: 0; margin: 22px 0 0; list-style: none; }
.ew-key-points li { position: relative; padding: 12px 0 12px 23px; border-top: 1px solid #344127; color: #b7c1a7; font-size: 1rem; line-height: 1.75; }
.ew-key-points li::before { content: ''; position: absolute; left: 0; top: 23px; width: 6px; height: 6px; border: 1px solid #c3a860; transform: rotate(45deg); }
.ew-key-points strong { color: #ddd4b4; }
.ew-lesson-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #465031; }
.ew-lesson-controls button, .ew-small-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 8px; padding: 10px 13px; border: 1px solid #6a6b41; border-radius: 5px; color: #ddcca0; background: #202a13; font-size: .875rem; line-height: 1.4; }
.ew-lesson-controls button:hover:not(:disabled), .ew-small-button:hover:not(:disabled) { border-color: #b69d59; background: #30391c; }
.ew-lesson-position { margin: 14px 0 0; color: #a2ad8d; font-size: .875rem; text-align: center; }
.ew-lesson-controls .ew-lesson-position { flex: 1 0 100%; margin-top: 6px; }
.ew-rule-grid, .ew-correction-grid { display: grid; grid-template-columns: 1.13fr .87fr; gap: 43px; align-items: center; }
.ew-rule-copy h3, .ew-correction-copy h3 { font-family: Georgia,serif; font-size: 1.875rem; font-weight: 400; }
.ew-rule-panel, .ew-correction-panel { min-width: 0; }
.ew-pattern-code { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 9px 15px; border: 1px solid #5e643b; border-radius: 5px; color: #e6cc8e; background: #242c15; font-family: Georgia,serif; font-size: 1.5rem; line-height: 1.3; letter-spacing: .06em; }
.ew-degree-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.ew-degree-grid h3 { font-family: Georgia,serif; font-size: 1.75rem; font-weight: 400; }
.ew-fib-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 45px; align-items: center; }
.ew-fib-grid > div, .ew-fib-grid > article { min-width: 0; }
.ew-ratio-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 23px; }
.ew-ratio-buttons button { flex: 1; padding-inline: 14px; min-height: 47px; color: #c8c7a8; font-variant-numeric: tabular-nums; }
.ew-fib-formula { padding: 16px 19px; border-left: 2px solid #b39757; color: #d4c79f; background: #1c2512; font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.ew-fib-formula p, .ew-fib-formula code { color: inherit; font: inherit; }
.ew-fib-output { display: block; margin-top: 17px; padding: 19px; border: 1px solid #5e6340; border-radius: 7px; color: #e5d4a2; background: #242e17; font-size: 1rem; line-height: 1.75; font-variant-numeric: tabular-nums; }
.ew-fib-output strong { display: block; margin-bottom: 4px; color: #f1d898; font-family: Georgia,serif; font-size: 1.5rem; font-weight: 400; }
.ew-fib-output p { color: inherit; }
.ew-alternative-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px; }
.ew-alternative-card { min-width: 0; padding: 28px; border: 1px solid #475132; border-radius: 12px; background: #121b0c; }
.ew-alternative-card .ew-chart { margin-bottom: 20px; max-height: 290px; }
.ew-alternative-card h3 { margin-bottom: 14px; font-family: Georgia,serif; font-size: 1.7rem; font-weight: 400; }
.ew-alternative-card ul:not(.ew-key-points) { margin: 19px 0 0; padding-left: 20px; color: #b9c3a6; font-size: 1rem; line-height: 1.8; }
.ew-alternative-card li::marker { color: var(--ew-gold); }
.ew-comparison-note { margin-top: 25px; padding: 19px 23px; border-left: 2px solid #a38f4d; color: #bbc5a8; background: #1a2411; font-size: 1rem; line-height: 1.8; }
.ew-comparison-note p { color: inherit; }
.ew-guidelines-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; }
.ew-guidelines-grid article { min-width: 0; padding: 28px; border: 1px solid #3d4b2c; border-radius: 10px; background: #111b0b; }
.ew-guidelines-grid h3 { font-family: Georgia,serif; font-size: 1.6rem; font-weight: 400; }
.ew-guidelines-grid p { margin-bottom: 0; }
.ew-exception { margin-top: 29px; padding: 0 25px; border: 1px solid #5e6139; border-radius: 9px; background: #1b2510; }
.ew-exception > summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 67px; padding: 20px 0; color: #ddc990; font-size: 1rem; font-weight: 500; line-height: 1.5; cursor: pointer; list-style: none; }
.ew-exception > summary::-webkit-details-marker { display: none; }
.ew-exception > summary::after { content: '+'; flex: 0 0 20px; font-size: 1.375rem; text-align: center; }
.ew-exception[open] > summary::after { content: '−'; }
.ew-exception > p, .ew-exception > div { padding-bottom: 23px; }
.ew-exception .ew-chart { max-height: 330px; }
.ew-workflow { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; border: 1px solid #455234; border-radius: 12px; background: #111b0c; overflow: hidden; }
.ew-step { min-width: 0; padding: 28px 22px; border-right: 1px solid #38472a; }
.ew-step:last-child { border-right: 0; }
.ew-step > span { display: inline-block; margin-bottom: 24px; color: var(--ew-gold); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.ew-step h3 { margin-bottom: 13px; font-family: Georgia,serif; font-size: 1.45rem; font-weight: 400; }
.ew-step p { margin: 0; }
.ew-example-note { margin-top: 23px; padding-left: 20px; border-left: 2px solid #a18d4c; color: #bac3a7; font-size: 1rem; line-height: 1.8; }
.ew-example-note p { color: inherit; }
.ew-practice-box { padding: 30px; border: 1px solid #726c3d; border-radius: 15px; background: radial-gradient(ellipse at 0 0,#2935155c,transparent 60%),#10190a; }
.ew-exercise-tabs { padding-bottom: 25px; margin-bottom: 27px; border-bottom: 1px solid #424e2d; }
.ew-exercise-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: start; }
.ew-exercise-panel > .ew-chart-panel { padding: 16px; background: #0a1206; }
.ew-exercise-copy h3 { font-family: Georgia,serif; font-size: 1.75rem; font-weight: 400; }
.ew-answer-buttons { display: grid; gap: 10px; margin-top: 24px; }
.ew-answer-buttons button { display: flex; align-items: center; justify-content: flex-start; min-height: 51px; padding: 13px 16px; border: 1px solid #58613b; border-radius: 6px; color: #d1d8bf; background: #1a2610; font-size: .875rem; font-weight: 500; line-height: 1.5; text-align: left; transition: border-color .2s,background .2s; }
.ew-answer-buttons button:hover { border-color: #b6a060; background: #29341a; }
.ew-answer-buttons button[aria-pressed="true"] { border-color: #e1bc6c; color: #f0dba9; background: #33391d; }
.ew-answer-buttons button[data-result="correct"], .ew-answer-buttons button.ew-answer-correct { border-color: #8bbfa0; background: #1a3320; color: #c5e3c9; }
.ew-answer-buttons button[data-result="try"], .ew-answer-buttons button.ew-answer-try { border-color: #c39476; background: #332a1c; color: #e7c8aa; }
.ew-exercise-feedback { margin-top: 20px; padding: 17px 19px; border: 1px solid #6b7041; border-radius: 7px; background: #263218; color: #d1d9bb; font-size: 1rem; line-height: 1.75; }
.ew-exercise-feedback:empty { display: none; }
.ew-exercise-feedback p { color: inherit; }
.ew-exercise-feedback[data-result="correct"] { border-color: #709875; background: #182b17; color: #c4dfbd; }
.ew-exercise-feedback[data-result="try"] { border-color: #94784d; background: #2c2915; color: #decc9d; }
.ew-exercise-reset { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; padding: 8px 0; border: 0; background: transparent; color: #c1b27c; font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
.ew-exercise-reset:hover { color: #efd391; }
.ew-mistakes-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 31px; }
.ew-mistakes-grid article { min-width: 0; padding: 27px 0; border-top: 1px solid #465033; }
.ew-mistakes-grid h3 { color: #ded3af; font-size: 1.125rem; font-weight: 500; }
.ew-mistakes-grid p { margin-bottom: 0; }
.ew-glossary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 40px; }
.ew-glossary-grid details { min-width: 0; border-bottom: 1px solid #3a492b; }
.ew-glossary-grid summary { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 20px; padding: 19px 0; color: #ddd5b8; font-size: 1rem; font-weight: 500; list-style: none; cursor: pointer; }
.ew-glossary-grid summary::-webkit-details-marker { display: none; }
.ew-glossary-grid summary::after { content: '+'; color: #d8bb72; font-size: 1.25rem; }
.ew-glossary-grid details[open] summary::after { content: '−'; }
.ew-glossary-grid details p { padding: 0 25px 25px 0; margin: 0; }
.ew-faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; align-items: start; }
.ew-faq-list { border-top: 1px solid #505a36; }
.ew-faq-list details { border-bottom: 1px solid #354529; }
.ew-faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 69px; padding: 21px 0; color: #dfe2ce; font-size: 1rem; font-weight: 500; line-height: 1.55; list-style: none; cursor: pointer; }
.ew-faq-list summary::-webkit-details-marker { display: none; }
.ew-faq-list summary::after { content: '+'; flex: 0 0 20px; color: var(--ew-gold); font-size: 1.375rem; text-align: center; }
.ew-faq-list details[open] summary::after { content: '−'; }
.ew-faq-list details p { padding: 0 38px 25px 0; margin: 0; }
.ew-reading-sources { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 25px; margin-top: 35px; padding-top: 23px; border-top: 1px solid #344527; color: #a4ae90; font-size: .875rem; }
.ew-reading-sources a { display: inline-flex; align-items: center; min-height: 40px; color: #c7c6ab; font-size: .875rem; text-decoration: underline; }
.ew-membership { padding: 88px 0; border-top: 1px solid #59522e; background: radial-gradient(ellipse at 12% 65%,rgba(145,111,37,.15),transparent 59%),#121809; }
.ew-membership-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 90px; align-items: center; }
.ew-membership-copy h2, .ew-membership-inner > div:first-child h2 { max-width: 590px; font-size: clamp(2.4rem,3.6vw,3.1rem); }
.ew-membership-copy > p, .ew-membership-inner > div:first-child > p { max-width: 565px; }
.ew-membership-card { min-width: 0; padding: 34px; border: 1px solid #8e7d44; border-radius: 13px; background: linear-gradient(140deg,#2b3218,#1a230e); box-shadow: 0 15px 55px #0004; }
.ew-membership-card h3 { font-family: Georgia,serif; font-size: 1.7rem; font-weight: 400; }
.ew-membership-price { margin: 21px 0 25px; color: #adb797; line-height: 1.2; }
.ew-membership-price strong { color: #f0d99d; font-family: Georgia,serif; font-size: 3.75rem; font-weight: 400; letter-spacing: -.06em; }
.ew-membership-price > span { margin-left: 8px; font-size: 1rem; }
.ew-membership-card ul { padding-left: 20px; margin: 23px 0 27px; color: #c9d0b5; font-size: 1rem; line-height: 1.8; }
.ew-membership-card li { padding: 4px 0; }
.ew-membership-card li::marker { color: var(--ew-gold); }
.ew-membership-card .ew-button { width: 100%; }
.ew-membership-details { margin-top: 18px; color: #aeb79a; font-size: 1rem; line-height: 1.75; }
.ew-membership-details p { color: inherit; }
.ew-membership-details a { color: #c4bb94; text-decoration: underline; }
.ew-related { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 23px; margin-top: 35px; }
.ew-related a { display: flex; flex-direction: column; gap: 7px; min-height: 94px; padding: 20px 0; border-top: 1px solid #4b5632; color: #e1d7b3; font-size: 1rem; }
.ew-related a span, .ew-related a small { color: #a7b28f; font-size: .875rem; line-height: 1.6; }

/* Local SVGs. Ratios and levels are supplied by the diagram, never by CSS. */
.ew-chart { display: block; width: 100%; max-width: 100%; height: auto; overflow: visible; }
.ew-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ew-chart-bg { fill: #0d1408; }
.ew-chart-area { fill: #d9b968; fill-opacity: .07; stroke: none; }
.ew-grid, .ew-chart-grid { fill: none; stroke: #abb899; stroke-width: 1; opacity: .1; }
.ew-zone-support { fill: #7bb598; fill-opacity: .11; stroke: #86bda2; stroke-opacity: .33; stroke-width: 1; }
.ew-zone-resistance { fill: #c99478; fill-opacity: .1; stroke: #c99478; stroke-opacity: .3; stroke-width: 1; }
.ew-zone-value { fill: #d4b160; fill-opacity: .13; stroke: #d4b160; stroke-opacity: .35; stroke-width: 1; }
.ew-zone-risk { fill: #c99488; fill-opacity: .1; stroke: #ce978a; stroke-opacity: .36; stroke-width: 1; }
.ew-zoom-box { fill: #d4b160; fill-opacity: .055; stroke: #b69d62; stroke-opacity: .65; stroke-width: 1.3; stroke-dasharray: 5 5; }
.ew-motive-line, .ew-price-line { fill: none; stroke: #e1bc6c; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ew-corrective-line { fill: none; stroke: #88bda7; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ew-subwave-line { fill: none; stroke: #a8c7aa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ew-alt-line { fill: none; stroke: #8bc1a8; stroke-width: 2; stroke-dasharray: 6 6; stroke-linecap: round; stroke-linejoin: round; }
.ew-alt-line[pathLength="1"] { stroke-dasharray: .045 .03; }
.ew-risk-line { fill: none; stroke: #ce978a; stroke-width: 1.6; stroke-dasharray: 5 5; }
.ew-risk-line[pathLength="1"] { stroke-dasharray: .025 .025; }
.ew-guide-line { fill: none; stroke: #a2b08e; stroke-width: 1; stroke-opacity: .5; stroke-dasharray: 4 5; }
.ew-guide-line[pathLength="1"] { stroke-dasharray: .02 .025; }
.ew-fib-line { fill: none; stroke: #d4b469; stroke-width: 1.3; stroke-opacity: .5; }
.ew-chart-label { fill: #afba9f; font-family: Arial,sans-serif; font-size: 18px; font-weight: 400; }
.ew-chart-label-gold { fill: #e1bc6c; font-family: Arial,sans-serif; font-size: 18px; }
.ew-chart-label-green { fill: #a0d0b3; font-family: Arial,sans-serif; font-size: 18px; }
.ew-chart-label-red { fill: #d9a699; font-family: Arial,sans-serif; font-size: 18px; }
.ew-wave-label { fill: #e2c783; font-family: Arial,sans-serif; font-size: 20px; font-weight: 700; }
.ew-subwave-label { fill: #b7d2bb; font-family: Arial,sans-serif; font-size: 18px; font-weight: 500; }
.ew-chart-dot { fill: #eed08a; stroke: #1d2811; stroke-width: 3; }
.ew-chart [data-ew-ratio] { transition: opacity .2s,stroke-width .2s,fill .2s; }
.ew-chart line.ew-ratio-active, .ew-chart path.ew-ratio-active { stroke: #e1bc6c; stroke-width: 2.5; stroke-opacity: 1; }
.ew-chart text.ew-ratio-active { fill: #f3d995; font-weight: 700; }
.ew-chart circle.ew-ratio-active { fill: #ffe1a0; stroke: #a88d48; stroke-width: 2; }
.ew-ratio-active .ew-guide-line { stroke: #e1bc6c; stroke-width: 2.5; stroke-opacity: 1; }
.ew-ratio-active .ew-chart-label, .ew-ratio-active .ew-chart-label-gold { fill: #f3d995; font-weight: 700; }
.ew-wave-piece { transition: opacity .2s; }
.ew-ready .ew-cycle-panel .ew-wave-piece { opacity: .36; }
.ew-ready .ew-cycle-panel .ew-wave-piece.ew-wave-active { opacity: 1; }
.ew-chart path.ew-wave-active { stroke-width: 4.5; filter: drop-shadow(0 0 4px #e1bc6c55); animation: none !important; stroke-dashoffset: 0 !important; }
.ew-chart text.ew-wave-active { fill: #fff0c4; }
.ew-chart circle.ew-wave-active { fill: #ffe4a3; r: 5.5; }
.ew-wave-active .ew-motive-line, .ew-wave-active .ew-corrective-line, .ew-wave-piece.ew-wave-active > path { stroke-width: 4.5; filter: drop-shadow(0 0 4px #e1bc6c55); }
.ew-wave-active .ew-wave-label { fill: #fff0c4; }
.ew-wave-active .ew-chart-dot { fill: #ffe4a3; }
.ew-draw { stroke-dashoffset: 0; }
.ew-ready .ew-draw:not(.ew-alt-line):not(.ew-risk-line):not(.ew-guide-line) { stroke-dasharray: 1; animation: ew-trace 8s ease-in-out infinite; }
.ew-ready .ew-pulse { transform-box: fill-box; transform-origin: center; animation: ew-pulse 4s ease-in-out infinite; }
.ew-paused *, .ew-paused *::before, .ew-paused *::after { animation-play-state: paused !important; }
.ew-paused .ew-draw { stroke-dashoffset: 0 !important; }
@keyframes ew-trace { 0%,6% { stroke-dashoffset: 1; } 58%,100% { stroke-dashoffset: 0; } }
@keyframes ew-pulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }

/* All lessons remain readable without JavaScript. */
.ew-page:not(.ew-ready) .ew-direction-tabs,
.ew-page:not(.ew-ready) .ew-wave-tabs,
.ew-page:not(.ew-ready) .ew-lesson-controls,
.ew-page:not(.ew-ready) .ew-lesson-position,
.ew-page:not(.ew-ready) .ew-rule-tabs,
.ew-page:not(.ew-ready) .ew-correction-tabs,
.ew-page:not(.ew-ready) .ew-ratio-buttons,
.ew-page:not(.ew-ready) .ew-exercise-tabs,
.ew-page:not(.ew-ready) .ew-answer-buttons,
.ew-page:not(.ew-ready) .ew-motion-button,
.ew-page:not(.ew-ready) .ew-exercise-reset { display: none; }
.ew-page:not(.ew-ready) .ew-draw { stroke-dashoffset: 0; }
.ew-page:not(.ew-ready) .ew-draw:not(.ew-alt-line):not(.ew-risk-line):not(.ew-guide-line) { stroke-dasharray: none; }
.ew-page:not(.ew-ready) .ew-cycle-panel + .ew-cycle-panel,
.ew-page:not(.ew-ready) .ew-rule-panel + .ew-rule-panel,
.ew-page:not(.ew-ready) .ew-correction-panel + .ew-correction-panel,
.ew-page:not(.ew-ready) .ew-exercise-panel + .ew-exercise-panel { margin-top: 31px; }
.ew-page:not(.ew-ready) .ew-wave-panel + .ew-wave-panel { margin-top: 24px; padding-top: 23px; border-top: 1px solid #44502f; }
.ew-page:not(.ew-ready) .ew-exercise-panel + .ew-exercise-panel { padding-top: 29px; border-top: 1px solid #44502f; }

@media (min-width: 1500px) {
  .ew-hero { padding-bottom: 94px; }
  .ew-hero-grid { gap: 70px; }
}
@media (max-width: 1120px) {
  .ew-hero-grid { gap: 31px; grid-template-columns: .9fr 1.12fr; }
  .ew-hero-copy h1 { font-size: 3.4rem; }
  .ew-terminal { padding-inline: 18px; }
  .ew-section-heading { gap: 44px; }
  .ew-definition-grid { gap: 50px; }
  .ew-cycle-grid { grid-template-columns: 1.15fr .85fr; gap: 23px; }
  .ew-wave-lesson { padding: 22px; }
  .ew-wave-tabs { gap: 4px; }
  .ew-lesson-controls button { padding-inline: 10px; }
  .ew-rule-grid, .ew-correction-grid, .ew-degree-grid, .ew-fib-grid { gap: 32px; }
  .ew-alternative-card { padding: 25px; }
  .ew-guidelines-grid { gap: 20px; }
  .ew-guidelines-grid article { padding: 24px; }
  .ew-workflow { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ew-step { padding: 27px; }
  .ew-step:nth-child(3) { border-right: 0; }
  .ew-step:nth-child(-n+3) { border-bottom: 1px solid #38472a; }
  .ew-exercise-panel { gap: 26px; }
  .ew-faq-grid, .ew-membership-inner { gap: 50px; }
}
@media (max-width: 940px) {
  .ew-hero { padding-bottom: 60px; }
  .ew-breadcrumb { margin-bottom: 36px; }
  .ew-hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .ew-hero-copy h1 { max-width: 700px; font-size: clamp(3.1rem,7.4vw,4.1rem); }
  .ew-page .ew-lead { max-width: 650px; }
  .ew-terminal { max-width: 790px; width: 100%; padding: 24px 26px 0; }
  .ew-terminal > .ew-chart { max-height: 390px; }
  .ew-jump-nav .container { gap: 18px; }
  .ew-jump-links { gap: 23px; }
  .ew-motion-button { padding-inline: 10px; }
  .ew-section { padding: 76px 0; }
  .ew-section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 35px; }
  .ew-section-heading > p { max-width: 690px; }
  .ew-definition-grid { gap: 36px; grid-template-columns: 1fr 1fr; }
  .ew-principles article { padding-left: 51px; }
  .ew-principle-symbol { width: 34px; height: 36px; }
  .ew-reading-grid { gap: 22px; }
  .ew-reading-grid article { padding-right: 18px; }
  .ew-cycle-grid { grid-template-columns: 1fr; gap: 25px; }
  .ew-cycle-visual .ew-chart { max-height: 370px; }
  .ew-wave-lesson { padding: 27px; }
  .ew-wave-tabs { gap: 9px; }
  .ew-wave-tabs button { min-height: 47px; }
  .ew-lesson-controls { justify-content: flex-start; gap: 12px; }
  .ew-lesson-controls button { padding-inline: 18px; }
  .ew-lesson-controls .ew-lesson-position { flex: 1; margin-top: 0; text-align: right; }
  .ew-rule-grid, .ew-correction-grid, .ew-degree-grid, .ew-fib-grid { grid-template-columns: 1fr; gap: 26px; }
  .ew-rule-grid .ew-chart, .ew-correction-grid .ew-chart, .ew-degree-grid .ew-chart, .ew-fib-grid .ew-chart { max-height: 350px; }
  .ew-ratio-buttons { max-width: 480px; }
  .ew-alternative-grid { gap: 20px; }
  .ew-alternative-card { padding: 23px; }
  .ew-guidelines-grid { grid-template-columns: 1fr; gap: 18px; }
  .ew-guidelines-grid article { padding: 27px; }
  .ew-exercise-panel { grid-template-columns: 1fr; gap: 25px; }
  .ew-exercise-panel .ew-chart { max-height: 340px; }
  .ew-answer-buttons { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ew-answer-buttons button { padding: 13px 15px; }
  .ew-mistakes-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
  .ew-faq-grid { grid-template-columns: 1fr; gap: 30px; }
  .ew-membership-inner { grid-template-columns: 1.1fr .9fr; gap: 30px; }
  .ew-membership-card { padding: 27px; }
}
@media (max-width: 650px) {
  .ew-page .container { width: calc(100% - 36px); }
  .ew-page h2 { font-size: 2.25rem; }
  .ew-hero { padding: 23px 0 46px; }
  .ew-breadcrumb { margin-bottom: 30px; font-size: .75rem; gap: 9px; }
  .ew-page .ew-kicker { font-size: .75rem; letter-spacing: .14em; margin-bottom: 16px; }
  .ew-hero-copy h1 { margin-bottom: 23px; font-size: clamp(2.75rem,11.5vw,3.6rem); line-height: 1.06; }
  .ew-page .ew-lead { font-size: 1rem; line-height: 1.85; }
  .ew-actions { gap: 10px; margin-top: 25px; }
  .ew-page .ew-button { padding: 13px 17px; min-height: 49px; }
  .ew-hero-notes { margin-top: 23px; gap: 8px 16px; font-size: .75rem; }
  .ew-hero-grid { gap: 31px; }
  .ew-terminal { padding: 18px 14px 0; border-radius: 12px; }
  .ew-terminal-top { gap: 9px; padding-bottom: 18px; }
  .ew-instrument strong { font-size: .875rem; }
  .ew-instrument > span, .ew-instrument small, .ew-chart-meta { font-size: .75rem; }
  .ew-page .ew-hero-caption { padding-bottom: 17px; }
  .ew-page .ew-hero-caption h2 { font-size: 1.125rem; }
  .ew-terminal-footer { font-size: .75rem; padding: 11px 0; }
  .ew-jump-nav .container { gap: 11px; min-height: 62px; }
  .ew-jump-links { gap: 22px; }
  .ew-jump-links a { min-height: 61px; font-size: .875rem; }
  .ew-motion-button { min-height: 44px; max-width: 133px; padding: 8px 10px; font-size: .875rem; }
  .ew-section { padding: 59px 0; }
  .ew-section-heading { gap: 18px; margin-bottom: 29px; }
  .ew-definition-grid { grid-template-columns: 1fr; gap: 29px; }
  .ew-principles article { padding: 24px 0 24px 54px; }
  .ew-principle-symbol { width: 35px; height: 36px; }
  .ew-reading-grid { grid-template-columns: 1fr; gap: 25px; margin-top: 30px; }
  .ew-reading-grid article { padding: 22px 0 0; border-right: 0; }
  .ew-note { padding: 17px 18px; }
  .ew-chart-panel { padding: 18px 14px; border-radius: 10px; }
  .ew-direction-tabs, .ew-rule-tabs, .ew-correction-tabs { gap: 8px; margin-bottom: 21px; }
  .ew-direction-tabs button, .ew-rule-tabs button, .ew-correction-tabs button, .ew-exercise-tabs button { min-height: 46px; padding: 10px 12px; font-size: .875rem; }
  .ew-direction-tabs button, .ew-correction-tabs button { flex: 1; }
  .ew-rule-tabs button { flex: 1 0 calc(50% - 8px); }
  .ew-wave-lesson { padding: 23px 20px; }
  .ew-wave-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 23px; }
  .ew-wave-tabs button { min-height: 44px; }
  .ew-wave-panel h3 { font-size: 1.7rem; }
  .ew-lesson-controls { gap: 8px; margin-top: 23px; }
  .ew-lesson-controls button { flex: 1; padding: 10px 9px; }
  .ew-lesson-controls .ew-lesson-position { flex: 1 0 100%; margin-top: 7px; text-align: center; }
  .ew-rule-copy h3, .ew-correction-copy h3 { font-size: 1.75rem; }
  .ew-key-points li { padding-left: 20px; }
  .ew-pattern-code { font-size: 1.4rem; }
  .ew-ratio-buttons { gap: 8px; }
  .ew-ratio-buttons button { min-height: 46px; padding: 10px 12px; }
  .ew-fib-formula, .ew-fib-output { padding: 16px 17px; }
  .ew-alternative-grid { grid-template-columns: 1fr; gap: 23px; }
  .ew-alternative-card { padding: 25px 21px; }
  .ew-alternative-card .ew-chart { max-height: 270px; }
  .ew-comparison-note { padding: 18px 20px; }
  .ew-guidelines-grid article { padding: 25px; }
  .ew-exception { padding-inline: 20px; }
  .ew-exception > summary { gap: 17px; }
  .ew-workflow { grid-template-columns: 1fr; }
  .ew-workflow .ew-step { padding: 26px; border-right: 0; border-bottom: 1px solid #38472a; }
  .ew-workflow .ew-step:last-child { border-bottom: 0; }
  .ew-step > span { margin-bottom: 15px; }
  .ew-step h3 { font-size: 1.5rem; }
  .ew-practice-box { padding: 22px 18px; border-radius: 11px; }
  .ew-exercise-tabs { gap: 8px; padding-bottom: 20px; margin-bottom: 23px; }
  .ew-exercise-tabs button { flex: 1; padding: 10px 9px; }
  .ew-exercise-panel > .ew-chart-panel { padding: 9px; }
  .ew-exercise-copy h3 { font-size: 1.7rem; }
  .ew-answer-buttons { grid-template-columns: 1fr; gap: 10px; }
  .ew-answer-buttons button { min-height: 52px; padding: 13px 16px; }
  .ew-exercise-feedback { padding: 17px; }
  .ew-mistakes-grid { grid-template-columns: 1fr; gap: 0; }
  .ew-mistakes-grid article { padding: 25px 0; }
  .ew-glossary-grid { grid-template-columns: 1fr; gap: 0; }
  .ew-glossary-grid summary { min-height: 67px; }
  .ew-glossary-grid details p { padding-right: 18px; }
  .ew-faq-list summary { gap: 20px; padding: 21px 0; font-size: 1rem; }
  .ew-faq-list details p { padding-right: 20px; }
  .ew-reading-sources { margin-top: 27px; gap: 7px 20px; }
  .ew-membership { padding: 61px 0; }
  .ew-membership-inner { grid-template-columns: 1fr; gap: 30px; }
  .ew-membership-copy h2, .ew-membership-inner > div:first-child h2 { font-size: 2.4rem; }
  .ew-membership-card { padding: 28px; }
  .ew-related { grid-template-columns: 1fr; gap: 0; margin-top: 26px; }
  .ew-related a { min-height: 94px; }
}
@media (max-width: 480px) {
  .ew-chart-minor { display: none; }
  .ew-chart-label, .ew-chart-label-gold, .ew-chart-label-green, .ew-chart-label-red, .ew-subwave-label { font-size: 25px; }
  .ew-wave-label { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .ew-page *, .ew-page *::before, .ew-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ew-draw { stroke-dashoffset: 0 !important; }
  .ew-draw:not(.ew-alt-line):not(.ew-risk-line):not(.ew-guide-line) { stroke-dasharray: none !important; }
  .ew-pulse { opacity: 1 !important; }
}
