/* EdgeLab — shared stylesheet (light) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text:    #1a1d21;
  --text-2:  #555d66;
  --text-3:  #79828c;
  --bg:      #ffffff;
  --bg-2:    #f6f8fa;
  --border:  #e3e7eb;
  --blue:    #1f77b4;   /* matches the charts */
  --blue-dk: #15598c;
  --blue-bg: #eef5fb;
  --red:     #d62728;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.85rem, 4.5vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 700; margin: 2.4em 0 0.7em; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1.8em 0 0.5em; }
p  { margin-bottom: 1.1em; }
a  { color: var(--blue); }
a:hover { color: var(--blue-dk); }
strong { font-weight: 650; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.narrow    { max-width: 760px;  margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.07em;
  color: var(--text); text-decoration: none;
}
.logo:hover { color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  color: var(--text-2); text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav .btn { font-size: 0.9rem; }
.site-nav a.btn { color: #fff; }
.site-nav a.btn:hover { color: #fff; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-block;
  background: var(--blue); color: #fff;
  font-weight: 600; font-size: 0.97rem;
  padding: 0.62em 1.25em;
  border: 1px solid var(--blue);
  border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--blue-dk); border-color: var(--blue-dk); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

.ml-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ml-form input[type="email"] {
  flex: 1 1 220px;
  font: inherit; color: var(--text);
  padding: 0.6em 0.9em;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff;
}
.ml-form input[type="email"]:focus { outline: 2px solid var(--blue-bg); border-color: var(--blue); }
.form-note { font-size: 0.82rem; color: var(--text-3); margin-top: 0.5rem; }
.form-error { display: none; color: var(--red); font-size: 0.88rem; margin-top: 0.5rem; }
.form-success { display: none; }

/* ---------- hero (home) ---------- */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 460px; gap: 3rem; align-items: center;
}
.hero h1 { margin-bottom: 0.6em; }
.hero .sub { font-size: 1.18rem; color: var(--text-2); max-width: 34em; }
.hero-photo img {
  width: 100%; height: auto; border-radius: 10px; display: block;
  border: 1px solid var(--border);
}
.hero-photo figcaption { font-size: 0.84rem; color: var(--text-3); margin-top: 0.5rem; text-align: center; }

/* ---------- signup box ---------- */
.signup-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.6rem 1.7rem;
  margin: 2.2rem 0;
}
.signup-box h3 { margin: 0 0 0.35rem; }
.signup-box > p { color: var(--text-2); margin-bottom: 1rem; font-size: 0.97rem; }

/* ---------- article cards ---------- */
.post-list { list-style: none; }
.post-card {
  display: grid; grid-template-columns: 240px 1fr; gap: 1.6rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.post-card:first-child { border-top: 1px solid var(--border); }
.post-card .thumb img {
  width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; display: block;
  background: #fff;
}
.post-card h3, .post-card h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.post-card a.title-link { color: var(--text); text-decoration: none; }
.post-card a.title-link:hover { color: var(--blue); }
.post-card .meta { font-size: 0.85rem; color: var(--text-3); margin-bottom: 0.4rem; }
.post-card p.excerpt { color: var(--text-2); font-size: 0.97rem; margin: 0; }

/* ---------- article ---------- */
.article-header { padding: 3rem 0 1rem; }
.article-header .meta { color: var(--text-3); font-size: 0.9rem; margin-bottom: 0.9rem; }
.article-header .meta a { color: inherit; }
.article-header h1 { margin-bottom: 0.5em; }
.article-header .lead { font-size: 1.2rem; color: var(--text-2); }

.byline {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.4rem 0 0.5rem;
}
.byline img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.byline .name { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.byline .name a { color: var(--text); text-decoration: none; }
.byline .name a:hover { color: var(--blue); }
.byline .dates { font-size: 0.84rem; color: var(--text-3); }

article.post { padding-bottom: 2rem; }
article.post figure { margin: 1.8rem 0; }
article.post figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
}
article.post figcaption {
  font-size: 0.86rem; color: var(--text-3); text-align: center; margin-top: 0.55rem;
}
article.post ul, article.post ol { margin: 0 0 1.1em 1.4em; }
article.post li { margin-bottom: 0.45em; }

.verdict {
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.3rem;
  margin: 1.6rem 0;
}
.verdict p { margin: 0; }
.verdict p + p { margin-top: 0.6em; }

.rules-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  margin: 1.6rem 0;
}
.rules-box h3 { margin: 0 0 0.6rem; font-size: 1.02rem; }
.rules-box ol { margin: 0 0 0 1.2em; }

table.stats {
  width: 100%; border-collapse: collapse; margin: 1.6rem 0;
  font-size: 0.95rem;
}
table.stats th, table.stats td {
  border: 1px solid var(--border); padding: 0.55em 0.8em;
}
table.stats th { background: var(--bg-2); text-align: left; font-weight: 650; }
table.stats td:not(:first-child), table.stats th:not(:first-child) { text-align: right; }
table.stats td:first-child { color: var(--text-2); }

.pullquote {
  border-left: 3px solid var(--blue);
  padding: 0.3rem 0 0.3rem 1.2rem;
  margin: 1.8rem 0;
  font-size: 1.15rem; color: var(--text-2); font-style: italic;
}
.pullquote p { margin: 0; }

.disclaimer-box {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.9rem 1.2rem; font-size: 0.86rem; color: var(--text-2); margin: 2rem 0;
}

/* ---------- download gate ---------- */
.gate {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.6rem 1.7rem;
  margin: 2.2rem 0;
}
.gate h3 { margin: 0 0 0.4rem; }
.gate > p { color: var(--text-2); font-size: 0.96rem; margin-bottom: 1rem; }
.gate .form-success { padding-top: 0.3rem; }
.gate .form-success a { font-weight: 600; }
.gate .form-success li { margin-bottom: 0.4em; }

/* ---------- author box ---------- */
.author-box {
  display: flex; gap: 1.1rem; align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin: 2.5rem 0;
}
.author-box img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.author-box .who { font-weight: 700; }
.author-box p { margin: 0.15rem 0 0; font-size: 0.92rem; color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq h3 { margin-top: 1.4em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.2rem 0 2.6rem;
  font-size: 0.92rem;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: var(--text-2); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.site-footer .fine {
  color: var(--text-3); font-size: 0.82rem; max-width: 70em;
}

/* ---------- popup ---------- */
.el-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 17, 20, 0.55);
  align-items: center; justify-content: center;
  padding: 1.25rem;
}
.el-overlay.show { display: flex; }
.el-modal {
  background: #fff; border-radius: 10px;
  max-width: 460px; width: 100%;
  padding: 1.8rem 1.8rem 1.6rem;
  position: relative;
  box-shadow: 0 18px 50px rgba(15, 17, 20, 0.25);
}
.el-modal h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.el-modal .el-sub { color: var(--text-2); font-size: 0.95rem; margin-bottom: 0.9rem; }
.el-modal ul { margin: 0 0 1.1rem 1.2em; font-size: 0.94rem; color: var(--text-2); }
.el-modal ul li { margin-bottom: 0.3em; }
.el-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 0.3rem;
}
.el-close:hover { color: var(--text); }

@media (max-width: 640px) {
  .el-overlay { align-items: flex-end; padding: 0; }
  .el-modal { border-radius: 14px 14px 0 0; max-width: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-photo { max-width: 200px; }
}
@media (max-width: 640px) {
  .site-nav {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 1rem 1.25rem; gap: 1rem;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .post-card { grid-template-columns: 1fr; gap: 0.9rem; }
  .post-card .thumb { max-width: 420px; }
  .hero { padding: 2.2rem 0 1.5rem; }
}
