/*
Theme Name: Zen Guide
Description: Child of Simple Dark for guide.zenscans.com. ZenBot's colors, type and top bar, with a light / dark switch. All of the look lives in this one file.
Template: simple-dark
Version: 1.0.0
Text Domain: zen-guide
*/

/* ------------------------------------------------------------------
   Colors. The same values as the app's static pages (how-to-trade,
   landing): light by default, html.dark flips them. The class is set
   in the <head> by header.php before the page paints.
   ------------------------------------------------------------------ */
:root {
  --zg-bg:        #f6f7fb;
  --zg-panel:     #ffffff;
  --zg-panel-2:   #eef0f7;
  --zg-rule:      #d9dde9;
  --zg-ink:       #1d2434;
  --zg-ink-dim:   #4b5568;
  --zg-ink-faint: #737e97;
  --zg-green:     #0a8f4a;
  --zg-green-tint: rgba(10, 143, 74, .10);
  --zg-green-line: rgba(10, 143, 74, .35);
  --zg-code-bg:   #eef0f7;
  --zg-shadow:    0 1px 2px rgba(20, 30, 60, .06), 0 8px 24px -12px rgba(20, 30, 60, .18);
  --zg-font:      system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --zg-mono:      ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;   /* code only */
}
html.dark {
  --zg-bg:        #06062d;
  --zg-panel:     #0c0f38;
  --zg-panel-2:   #090b30;
  --zg-rule:      #232a5c;
  --zg-ink:       #e9ecfa;
  --zg-ink-dim:   #99a2c9;
  --zg-ink-faint: #6b76a6;
  --zg-green:     #1fd978;
  --zg-green-tint: rgba(31, 217, 120, .10);
  --zg-green-line: rgba(31, 217, 120, .35);
  --zg-code-bg:   #0c0f38;
  --zg-shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .6);
}

/* ---------- page ---------- */
html { background: var(--zg-bg); scroll-padding-top: 66px; }   /* in-page links land below the sticky bar */
body, body.custom-background {
  background: var(--zg-bg) !important;
  color: var(--zg-ink);
  font-family: var(--zg-font);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
/* The parent dims and sharpens every image for its black ground. */
img, a:hover img, a:focus img { -webkit-filter: none; filter: none; }

/* ---------- top bar: the app's static nav ---------- */
#zg-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--zg-rule);
  background: var(--zg-bg);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  position: sticky; top: 0; z-index: 50;
}
#zg-nav .zg-brand { display: inline-flex; align-items: center; margin-right: 10px; }
#zg-nav .zg-brand img { height: 38px; width: auto; display: block; margin: 0; }
/* The "Guide" chip beside the logo is gone (the menu already says where you are). */
#zg-nav .zg-brand-tag { display: none; }
#zg-nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
#zg-nav li { list-style: none; margin: 0; }
#zg-nav li a, #zg-nav .zg-icon {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 6px; border: 1px solid transparent;
  color: var(--zg-ink); text-decoration: none; white-space: nowrap; background: transparent;
  transition: background .15s ease, border-color .15s ease;
}
#zg-nav li a:hover, #zg-nav li a:focus, #zg-nav .zg-icon:hover,
#zg-nav li.current-menu-item > a, #zg-nav li.current_page_parent > a {
  background: var(--zg-green-tint); border-color: var(--zg-green-line);
  color: var(--zg-ink); font-weight: inherit; outline: none;
}
#zg-nav li.current-menu-item > a, #zg-nav li.current_page_parent > a { font-weight: 600; }
/* The way back into the app: the last menu item, in the app's yellow.
   On a wide screen the search box sits before it and both go to the right. */
#zg-nav li:last-child { order: 2; }
#zg-nav .zg-icon { order: 3; }
#zg-nav li:last-child a, #zg-nav li:last-child a:hover {
  background: #ffd500; border-color: transparent; color: #000; font-weight: 500;
}
#zg-nav li:last-child a:hover { background: #ffe14b; }
/* A link that leaves for YouTube says so: the play mark before, the
   "opens elsewhere" arrow after (both from the parent's icon font). */
#zg-nav li a[href*="youtube.com"]::before {
  content: "\f16a"; font-family: ForkAwesome; font-size: 15px; color: #ff0033; line-height: 1;
}
#zg-nav li a[href*="youtube.com"]::after {
  content: "\f08e"; font-family: ForkAwesome; font-size: 11px; opacity: .6; line-height: 1; margin-left: 1px;
}
#zg-nav .zg-icon { cursor: pointer; padding: 5px 7px; font-size: 14px; line-height: 1; }
#zg-nav .zg-icon svg { width: 16px; height: 16px; display: block; fill: currentColor; }

#zg-nav form { position: static; order: 1; margin: 0 8px 0 auto; }
#zg-nav form .input-group { flex-wrap: nowrap; width: 190px; }
#zg-nav form input.field {
  height: 30px; padding: 3px 10px; font-size: 13px;
  background: var(--zg-panel); color: var(--zg-ink);
  border: 1px solid var(--zg-rule); border-right: 0; border-radius: 6px 0 0 6px; box-shadow: none;
}
#zg-nav form input.field::placeholder { color: var(--zg-ink-faint); }
#zg-nav form input.field:focus { border-color: var(--zg-green-line); }
#zg-nav form button.submit {
  height: 30px; padding: 0 9px; font-size: 12px;
  background: var(--zg-panel); color: var(--zg-ink-dim);
  border: 1px solid var(--zg-rule); border-radius: 0 6px 6px 0;
}
#zg-nav form button.submit:hover { color: var(--zg-green); background: var(--zg-panel); border-color: var(--zg-rule); }

#zg-nav .zg-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
#zg-nav .zg-burger { display: none; }

@media (max-width: 820px) {
  #zg-nav { padding: 5px 10px; }
  #zg-nav .zg-brand img { height: 32px; }
  #zg-nav .zg-spacer { flex: 1 1 auto; }
  #zg-nav .zg-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 32px; height: 32px; padding: 6px; box-sizing: border-box; margin: 0 0 0 4px;
    border-radius: 6px; cursor: pointer;
  }
  #zg-nav .zg-burger span { display: block; height: 2px; border-radius: 1px; background: var(--zg-ink); }
  #zg-nav .zg-items {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px;
    background: var(--zg-bg); border-bottom: 1px solid var(--zg-rule);
    box-shadow: 0 6px 12px -4px rgba(0, 0, 0, .25);
  }
  #zg-nav .zg-toggle:checked ~ .zg-items { display: flex; }
  #zg-nav .zg-items ul { display: flex; flex-direction: column; gap: 2px; }
  #zg-nav li a { display: flex; padding: 10px 12px; }
  #zg-nav form { margin: 6px 0 2px; }
  #zg-nav .zg-burger { order: 4; }
  #zg-nav form .input-group { width: 100%; }
}
@media (min-width: 821px) {
  #zg-nav .zg-items { display: contents; }
  #zg-nav .zg-spacer { display: none; }
}

/* ---------- layout: one readable column ---------- */
.site .wrapper { padding: 0; }
/* #content is a Bootstrap .container on posts but a bare div on the
   "right sidebar" page template (the Guide page), where its .row then
   hung 15px off each side and the page scrolled sideways. */
#content { width: 100%; max-width: 1040px; min-width: 0; margin: 0 auto; padding: 34px 22px 56px; box-sizing: border-box; }
#content > .row { margin-left: 0; margin-right: 0; }
#primary { max-width: 780px; margin: 0 auto; padding: 0; flex: 1 1 auto; min-width: 0; }
/* The sidebar's only widget is the same menu the top bar now carries.
   A sidebar with other widgets keeps its place beside the column. */
.widget-area .widget_nav_menu { display: none; }
.widget-area:not(:has(.widget:not(.widget_nav_menu))) { display: none; }
.widget-area { font-size: 15px; }
.widget-area .widget { border-color: var(--zg-rule) !important; }

/* ---------- type ---------- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--zg-font); font-weight: 700; letter-spacing: -.01em;
  color: var(--zg-ink); line-height: 1.2;
}
h1.entry-title { font-size: clamp(30px, 4.4vw, 42px); letter-spacing: -.02em; margin-bottom: 10px; border: 0 !important; }
.entry-content h2 { font-size: 26px; margin: 38px 0 12px; }
.entry-content h3 { font-size: 22px; margin: 30px 0 8px; }
.entry-content h4 { font-size: 20px; margin: 28px 0 6px; }
.entry-content h5, .entry-content h6 { font-size: 17px; margin: 22px 0 6px; }
.entry-content p, .entry-content li { color: var(--zg-ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 5px; }
.entry-content strong { font-weight: 650; }
.entry-content hr, hr { border: 0; border-top: 1px solid var(--zg-rule); margin: 34px 0; }

a { color: var(--zg-green); text-decoration: none; }
a:hover { color: var(--zg-green) !important; text-decoration: underline; font-weight: inherit; }
.entry-content :not(.wp-block-button) :not(.wp-block-tag-cloud) a,
.entry-content p:not(.wp-block-tag-cloud) a { border-bottom: 1px solid var(--zg-green-line); }
.entry-content :not(.wp-block-button) :not(.wp-block-tag-cloud) a:hover,
.entry-content p:not(.wp-block-tag-cloud) a:hover { border-bottom-color: currentColor; text-decoration: none; }
.entry-content figure a, .entry-content .wp-block-image a { border-bottom: 0 !important; }

.border-bottom { border-bottom: 1px solid var(--zg-rule) !important; }
.border-top { border-top: 1px solid var(--zg-rule) !important; }

/* date, author, category */
.entry-meta, .entry-footer {
  font-size: 13px; color: var(--zg-ink-faint);
}
.entry-meta a, .entry-footer a { color: var(--zg-ink-faint); border: 0 !important; }
.entry-meta a:hover, .entry-footer a:hover { color: var(--zg-green) !important; }
/* A post never edited since publishing carries ONE time tag with both classes ("published updated"):
   hiding .updated alone hid the date and left its clock icon standing (found 2026-10-13). */
.entry-meta time.updated:not(.published), .entry-meta .byline { display: none; }
.single .entry-meta { border: 0 !important; margin-bottom: 22px !important; }

/* ---------- pictures ---------- */
.entry-content img, img.wp-post-image, .img-border {
  max-width: 100%; height: auto;
  border: 1px solid var(--zg-rule); border-radius: 10px;
  box-shadow: var(--zg-shadow);
  background: var(--zg-panel);
}
.single img.wp-post-image { margin-bottom: 26px !important; }
.entry-content figure { margin: 26px 0; }
figcaption, .wp-element-caption {
  font-size: 13px; color: var(--zg-ink-faint); text-align: center; margin-top: 8px;
}
.wp-block-embed iframe, .entry-content iframe { max-width: 100%; border-radius: 10px; }

/* ---------- code, quotes, tables ---------- */
code, pre, kbd { font-family: var(--zg-mono); }
:not(pre) > code {
  font-size: .86em; padding: 2px 6px; border-radius: 5px;
  background: var(--zg-code-bg); color: var(--zg-ink); border: 1px solid var(--zg-rule);
}
pre, .wp-block-code {
  background: var(--zg-code-bg); color: var(--zg-ink);
  border: 1px solid var(--zg-rule); border-radius: 10px; padding: 16px 18px; font-size: 13.5px;
}
.wp-block-code code { background: transparent; padding: 0; border: 0; color: inherit; }
blockquote, .wp-block-quote {
  margin: 24px 0; padding: 12px 18px !important;
  border-left: 3px solid var(--zg-green); background: var(--zg-green-tint);
  border-radius: 0 8px 8px 0; font-size: 1em; color: var(--zg-ink);
}
blockquote p:last-child { margin-bottom: 0; }
.site-main table { color: var(--zg-ink); font-size: 15px; }
.site-main td, .site-main th { border: 1px solid var(--zg-rule); padding: 8px 10px; }
.site-main th { background: var(--zg-panel-2); font-weight: 650; text-align: left; }

/* ---------- the post list (New Features, archives, search) ---------- */
.blog #main > article, .archive #main > article, .search #main > article {
  background: var(--zg-panel);
  border: 1px solid var(--zg-rule) !important; border-radius: 12px;
  padding: 20px 22px 16px !important; margin-bottom: 16px !important;
  box-shadow: var(--zg-shadow);
}
#main > article h2.entry-title { font-size: 23px; margin-bottom: 4px; }
#main > article h2.entry-title a { color: var(--zg-ink); }
#main > article h2.entry-title a:hover { color: var(--zg-green) !important; text-decoration: none; }
#main > article > .row .entry-content p { color: var(--zg-ink-dim); margin-bottom: 8px; font-size: 16px; }
#main > article > .row img.wp-post-image { margin-top: 6px !important; box-shadow: none; }

/* older / newer post links */
.post-navigation .nav-links > div { border-color: var(--zg-rule) !important; font-size: 15px; }
.post-navigation, .post-navigation i { color: var(--zg-ink-faint); }
.page-link { color: var(--zg-ink); border-color: var(--zg-rule); background: var(--zg-panel); }
.page-item.active .page-link { background: var(--zg-green-tint); border-color: var(--zg-green-line); color: var(--zg-ink); }

/* buttons in posts */
.wp-block-button__link, a.wp-block-button__link {
  background: var(--zg-green); color: #fff !important; border: 0 !important; border-radius: 8px; font-weight: 600;
}
html.dark .wp-block-button__link, html.dark a.wp-block-button__link { color: #04130a !important; }

/* forms and comments */
.form-control, textarea, input[type=text], input[type=email], input[type=url] {
  background: var(--zg-panel); color: var(--zg-ink); border: 1px solid var(--zg-rule);
}
.form-control:focus { background: var(--zg-panel); color: var(--zg-ink); border-color: var(--zg-green-line); box-shadow: none; }
.btn-primary, input[type=submit] { color: var(--zg-ink); border-color: var(--zg-rule); background: var(--zg-panel); }

/* ---------- footer ---------- */
#wrapper-footer { max-width: 1040px; }
.site-footer { border-top: 1px solid var(--zg-rule) !important; padding: 18px 0 30px !important; }
.site-info { font-size: 13px; color: var(--zg-ink-faint); }
.site-info a { color: var(--zg-ink-dim); border: 0 !important; margin: 0 8px; }

.top-btn, .top-btn:hover, .top-btn:focus {
  background: var(--zg-panel); border: 1px solid var(--zg-rule); color: var(--zg-ink-dim); border-radius: 8px;
}

/* The block editor, so writing a post looks like reading one. */
.editor-styles-wrapper { background-color: #f6f7fb; color: #1d2434; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  #content { padding: 22px 16px 40px; }
  .blog #main > article, .archive #main > article { padding: 16px 16px 12px !important; }
}

/* ------------------------------------------------------------------
   A single post (single.php): a way back to the list above the title,
   and the latest posts in a side menu that stays in view while reading.
   On a narrow screen the menu drops below the post.
   ------------------------------------------------------------------ */
#content.zg-single { max-width: 1180px; }
#content.zg-single > .row { flex-wrap: nowrap; justify-content: center; gap: 48px; align-items: flex-start; }
#content.zg-single #primary { margin: 0; flex: 1 1 auto; }

.zg-back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 18px; padding: 5px 12px 5px 10px;
  border: 1px solid var(--zg-rule); border-radius: 999px; background: var(--zg-panel);
  font-size: 13.5px; color: var(--zg-ink-dim); text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.zg-back i { font-size: 11px; }
.zg-back:hover { color: var(--zg-ink) !important; border-color: var(--zg-green-line); background: var(--zg-green-tint); text-decoration: none; }

.zg-side { flex: 0 0 270px; width: 270px; position: sticky; top: 74px; align-self: flex-start; }
.zg-side-inner { max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.zg-side-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--zg-ink-faint); margin: 6px 0 8px 12px;
}
.zg-side ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--zg-rule); }
.zg-side li { margin: 0 0 0 -1px; }
.zg-side li a {
  display: block; padding: 7px 10px 7px 12px;
  border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
  color: var(--zg-ink-dim); text-decoration: none; line-height: 1.35;
}
.zg-side li a:hover { color: var(--zg-ink) !important; background: var(--zg-green-tint); text-decoration: none; }
.zg-side li.zg-here a { border-left-color: var(--zg-green); color: var(--zg-ink); font-weight: 650; }
.zg-side-name { display: block; font-size: 14px; }
.zg-side-date { display: block; font-size: 11.5px; color: var(--zg-ink-faint); font-weight: 400; margin-top: 1px; }
.zg-side-all { display: inline-block; margin: 10px 0 0 12px; font-size: 13.5px; }

@media (max-width: 1020px) {
  #content.zg-single > .row { flex-wrap: wrap; gap: 0; }
  #content.zg-single #primary { margin: 0 auto; }
  .zg-side { position: static; flex: 1 1 100%; width: auto; max-width: 780px; margin: 10px auto 0; padding-top: 22px; border-top: 1px solid var(--zg-rule); }
  .zg-side-inner { max-height: none; overflow: visible; }
}
