/* Shared layout for the info pages (about, FAQ, contact, legal). Colours come from theme.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* Top navigation: the same as Home in index.html (lib/nav.php, pages.js). Keep these in step with index.html's header rules. */
header { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; z-index: 25; font-size: 15px; line-height: 1.5; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; } .brand b { color: var(--accent); }
.search { flex: 1 1 260px; max-width: 420px; position: relative; }
.search input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 15px; }
.search ul { position: absolute; z-index: 5; left: 0; right: 0; top: 44px; margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; max-height: 320px; overflow: auto; display: none; }
.search li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-family: var(--mono); margin: 0; }
.search li:hover, .search li.on { background: var(--line); }
#list li .kind { float: right; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-top: 2px; }
#list li .cn { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 12px; color: var(--muted); margin-left: 4px; }
#list li.sgroups { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); cursor: default; position: sticky; top: -4px; background: var(--panel); z-index: 1; font-family: inherit; }
#list li.sgroups:hover, #list li.snone:hover { background: var(--panel); }
#list li.sgroups button { font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
#list li.sgroups button.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
#list li.snone { cursor: default; color: var(--muted); font-family: inherit; font-size: 13px; }
#list li.snone button { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.acct { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
:root { --icon: 26px; }
.help { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 700; text-decoration: none; font-size: 13px; white-space: nowrap; } .help:hover { filter: brightness(1.1); }
.cslink, .homelink { display: inline-grid; place-items: center; width: 32px; height: 34px; color: var(--accent); text-decoration: none; }
.portlink { display: inline-grid; place-items: center; width: 32px; height: 34px; color: var(--break); text-decoration: none; }
.cslink svg, .homelink svg, .portlink svg { width: var(--icon); height: var(--icon); flex: none; }
.cslink:hover, .homelink:hover, .portlink:hover { opacity: .85; }
.acct .cslink + .homelink, .acct .homelink ~ .portlink { margin-left: -10px; }
body:not(.anon) .menuwrap { margin-left: -10px; }
body.anon .memonly, body:not(.anon) .anononly { display: none !important; }
.signin { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 4px; white-space: nowrap; }
.getbtn { display: inline-block; background: var(--accent); color: var(--bg); font-weight: 700; padding: 6px 14px; border-radius: 10px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.menuwrap { position: relative; }
.menubtn { position: relative; display: grid; place-items: center; width: 36px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.menubtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.menu { position: absolute; right: 0; top: 42px; z-index: 40; width: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.3); color: var(--text); font-size: 14px; }
:root[data-theme="space"] .menu { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: #0a0e1d; border-color: #2b3870; }
.menu .mlink { display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; } .menu .mlink:hover { background: var(--line); }
.menu .mrow { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.theme { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
@media (max-width: 700px) {
  header { gap: 10px 12px; padding: 10px 12px; }
  .brand { order: 1; } .acct { order: 2; } .search { order: 3; flex: 1 1 100%; max-width: none; }
  .acct .help { display: none; }
  .menubtn { width: 42px; height: 40px; }
  .cslink { width: 34px; height: 40px; } .homelink, .portlink { width: 36px; height: 40px; }
  body:not(.anon) .menuwrap, .acct .cslink + .homelink { margin-left: -8px; }
}
@media (max-width: 480px) { #list li.sgroups button { padding: 3px 9px; } }
main { max-width: 780px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 10px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 24px; }
.updated { color: var(--muted); font-size: 14px; margin: -14px 0 22px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; scroll-margin-top: 16px; }
section h2 { font-size: 19px; margin: 0 0 8px; }
section h3 { font-size: 15.5px; margin: 16px 0 4px; }
section p { margin: 0 0 10px; } section p:last-child, section ul:last-child { margin-bottom: 0; }
section ul { margin: 0 0 10px; padding-left: 22px; } section li { margin: 3px 0; }
a { color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 4px; }
td, th { text-align: left; padding: 8px; border-top: 1px solid var(--line); vertical-align: top; } th { color: var(--muted); font-weight: 600; font-size: 13px; border-top: 0; }
.draft { border: 1px dashed var(--target); color: var(--text); background: color-mix(in srgb, var(--target) 10%, transparent); border-radius: 12px; padding: 10px 14px; margin: 0 0 20px; font-size: 14.5px; }
.draft b { color: var(--target); }
mark { background: color-mix(in srgb, var(--target) 28%, transparent); color: var(--text); padding: 0 4px; border-radius: 4px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; } .faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; } .faq details p { margin: 8px 0 0; color: var(--text); }
/* contact form */
form.contact label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; } form.contact label:first-child { margin-top: 0; }
form.contact input, form.contact select, form.contact textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
form.contact textarea { min-height: 160px; resize: vertical; }
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
form.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.contact button { margin-top: 16px; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
form.contact button:disabled { opacity: .6; cursor: default; }
.formmsg { margin-top: 12px; font-size: 15px; } .formmsg.err { color: var(--break); } .formmsg.ok { color: var(--up); }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
/* footer, shared with the app */
footer.site { border-top: 1px solid var(--line); margin-top: 24px; padding: 22px 16px 34px; text-align: center; font-size: 14px; color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
footer.site a { color: var(--muted); text-decoration: none; } footer.site a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 600px) { h1 { font-size: 25px; } section { padding: 16px; } }

html { scrollbar-gutter: stable; }   /* header stays put whether or not the page scrolls */
/* cheat sheet page */
.cs-prev { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.cs-prev.light { display: none; }
:root[data-theme="light"] .cs-prev.dark { display: none; } :root[data-theme="light"] .cs-prev.light { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .cs-prev.dark { display: none; } :root:not([data-theme]) .cs-prev.light { display: block; } }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.dl a { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none; }
.dl a.main { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.dl a small { font-weight: 500; opacity: .8; }
/* Pricing page */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 8px 0 28px; }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 0; }
.plan.best { border: 2px solid var(--accent); }
.plan h2 { margin-top: 0; }
.plan h2 small { font-size: 12px; font-weight: 700; color: var(--accent); margin-left: 6px; letter-spacing: .04em; text-transform: uppercase; }
.plan .price { margin: 0 0 10px; }
.plan .price b { font-size: 28px; }
.plan .price span { display: block; color: var(--muted); font-size: 14px; }
.plan ul { padding-left: 18px; margin: 0; }
.moneyback { margin: -14px 0 28px; font-size: 14px; color: var(--muted); } .moneyback b { color: var(--text); }
/* New to Elliott Waves page (learn.html) */
.learn .kicker { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.learn nav.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 24px; }
.learn nav.toc b { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.learn nav.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2 220px; } .learn nav.toc a { color: var(--text); }
.learn main .w { color: var(--wave); font-weight: 700; } .learn main .c { color: var(--abc); font-weight: 700; } .learn main .t { color: var(--target); } .learn main .b { color: var(--break); }   /* main only: the cookie banner also uses .c */
.learn svg.diag { width: 100%; height: auto; display: block; margin: 10px 0 12px; }
.learn svg.diag text { paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.learn table.waves td:first-child { width: 56px; }
.learn .chip { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid var(--wave); color: var(--wave); font-weight: 700; font-size: 13px; }
.learn .chip.abc { border-color: var(--abc); color: var(--abc); }
.learn ol.rules { margin: 0 0 12px; padding-left: 22px; } .learn ol.rules li { margin: 4px 0; }
.learn .helps { border-left: 3px solid var(--accent); padding: 8px 12px; margin: 12px 0 0; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 8px 8px 0; }
.learn .helps b { color: var(--accent); }
.learn .tryit { margin-top: 16px; padding: 16px; border: 1px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.learn .tryit h3 { margin: 0 0 4px; font-size: 17px; }
:is(.learn, .cta) .btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
:is(.learn, .cta) .btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: 14.5px; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--panel); }
:is(.learn, .cta) .btn.main { background: var(--accent); border-color: var(--accent); color: var(--bg); }
:is(.learn, .cta) .btn.freebtn { background: var(--up); border-color: var(--up); color: #04120b; } :is(.learn, .cta) .btn.freebtn:hover { filter: brightness(1.08); }
:root[data-theme="light"] :is(.learn, .cta) .btn.freebtn { background: #047857; border-color: #047857; color: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) :is(.learn, .cta) .btn.freebtn { background: #047857; border-color: #047857; color: #fff; } }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) :is(.learn, .cta) .btn.freebtn { color: #000; text-shadow: none; }
.learn .tryit .more { margin: 10px 0 0; font-size: 15px; }
.learn .centre { text-align: center; }
@media (max-width: 600px) { :is(.learn, .cta) .btns .btn { flex: 1 1 auto; justify-content: center; } }
