/* SizePlan site. Palette matches the EA panel (TC_PanelTheme.mqh). */
:root {
  --bg: #001622;
  --bg-deep: #000f18;
  --panel: #001b28;
  --panel-2: #002636;
  --edge: #0b4a5c;
  --edge-strong: #008ba8;
  --text: #eff7ff;
  --muted: #a4c2d6;
  --cyan: #00dcf1;
  --teal: #00d6aa;
  --red: #ff394d;
  --green: #00e06d;
  --radius: 12px;
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; height: auto; display: block; }

code, kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 15, 24, 0.94);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; color: var(--cyan); }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid var(--edge-strong);
  color: var(--text);
  background: linear-gradient(#064c66, #002a3e);
}
.btn:hover { text-decoration: none; border-color: var(--cyan); }
.btn-primary { background: linear-gradient(#00b0d5, #006ba1); border-color: #72f8ff; }
.btn-small { padding: 7px 14px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: default; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--edge-strong);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1000px 420px at 80% 0%, #003447 0%, transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 16px 0; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.hero-figure {
  background: var(--bg-deep);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.hero-figure figcaption { font-size: 13px; color: var(--muted); padding: 8px 4px 0; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-deep); border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 8px; }
.section-lead { color: var(--muted); max-width: 720px; margin: 0 0 36px; font-size: 18px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(#002f3e, #00192a);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 22px;
}
.card p, .card li { color: var(--muted); font-size: 16px; }
.card p { margin: 0; }
.card ul { margin: 8px 0 0; padding-left: 20px; }
.card .icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: #003c50; border: 1px solid var(--edge-strong);
  margin-bottom: 14px; color: var(--cyan);
}
.card .icon svg { width: 20px; height: 20px; }

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; top: 18px; left: 22px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cyan); color: var(--bg); font-weight: 800; font-size: 14px;
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; color: var(--muted); }
.checklist li strong { color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.cta-band { text-align: center; }
.cta-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* Documentation pages */
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 44px); margin: 12px 0; line-height: 1.15; }
.page-head p { color: var(--muted); font-size: 19px; max-width: 760px; margin: 0; }
.doc { padding: 16px 0 72px; }
.doc .wrap { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 88px; font-size: 15px; }
.toc p { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); }
.doc article { max-width: 760px; min-width: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc article h2 { margin-top: 48px; padding-top: 8px; scroll-margin-top: 80px; }
.doc article h2:first-child { margin-top: 0; }
.doc article p, .doc article li { color: #cfe0ec; }
.doc article ol, .doc article ul { padding-left: 22px; }
.doc article li { margin: 6px 0; }

.callout {
  border: 1px solid var(--edge-strong);
  border-left: 4px solid var(--cyan);
  background: var(--panel);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
}
.callout.warn { border-left-color: #ffb872; }
.callout p { margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
td code { white-space: nowrap; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 0 20px;
}
.faq details[open] { border-color: var(--edge-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  font-weight: 700;
  font-size: 18px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 14px;
  color: var(--cyan); font-size: 24px; font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: #cfe0ec; }
.faq details > div p { margin: 0 0 10px; }
.faq h2 { margin: 40px 0 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--edge); background: var(--bg-deep); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); }
.risk { max-width: 900px; font-size: 13px; line-height: 1.55; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .doc .wrap { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .nav { margin-left: 0; gap: 16px; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 36px; }
  section { padding: 48px 0; }
}
