/* ==========================================================================
   Expenses – Plan & Track  ·  article_content styles for ruedee.com
   Loaded from inside article_content on the three /app/ pages only
   (article_group_id 85). It therefore has to coexist with main.css and the
   CMS header/footer: EVERY rule is scoped under .exp, and there are no bare
   element selectors (body, img, a, h1…) that could leak into the shell.

   Palette: ruedee deep green #17352b / cream #fffdf8 / lime #d8ec9d,
   plus the app's own green #408c40 and expense red #bf0000.
   Assets live in /images/app/.
   ========================================================================== */

/* The layout-0 template prints a full-width <img src="{fb_page_banner}">
   above the H1. These pages carry their own responsive hero instead, and the
   banner field is kept only so og:image resolves — so hide the strip. This is
   the one rule outside .exp; it is safe because this file is only ever loaded
   by the three Expenses articles. */
.sectionwidebanner_container { display: none !important; }

.exp {
  --exp-ink: #17352b;
  --exp-ink-soft: #40564d;
  --exp-muted: #6b7d74;
  --exp-cream: #fffdf8;
  --exp-paper: #fff;
  --exp-lime: #d8ec9d;
  --exp-green: #408c40;
  --exp-green-dark: #2f6b30;
  --exp-line: rgba(23, 53, 43, .12);
  --exp-line-soft: rgba(23, 53, 43, .07);
  --exp-shadow-s: 0 1px 2px rgba(23, 53, 43, .06), 0 4px 14px rgba(23, 53, 43, .05);
  --exp-shadow-m: 0 2px 6px rgba(23, 53, 43, .07), 0 18px 44px rgba(23, 53, 43, .10);
  --exp-radius: 18px;
  --exp-radius-l: 28px;
  --exp-sans: "DM Sans", "Noto Sans Thai", "Sarabun", -apple-system,
              BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  margin: 0 -10px;                 /* cancel .spacelr so bands can go edge to edge */
  color: var(--exp-ink);
  background: var(--exp-cream);
  font-family: var(--exp-sans);
  font-size: 17px;
  line-height: 1.65;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.exp *, .exp *::before, .exp *::after { box-sizing: border-box; }

.exp img { max-width: 100%; height: auto; display: block; }
.exp a { color: var(--exp-green-dark); text-underline-offset: 3px; }
.exp a:hover { color: var(--exp-ink); }
.exp p { margin: 0 0 1.1em; }
.exp h2, .exp h3, .exp h4 {
  margin: 0 0 .5em; padding: 0; border: 0;
  line-height: 1.18; letter-spacing: -.02em; font-weight: 700; color: var(--exp-ink);
}
.exp h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); letter-spacing: -.03em; }
.exp h3 { font-size: 1.2rem; }
.exp ul { margin: 0 0 1.1em; padding-left: 1.25em; }
.exp li { margin-bottom: .5em; }
.exp code {
  padding: 2px 7px; border-radius: 6px; background: rgba(23, 53, 43, .07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; white-space: nowrap;
}
.exp :focus-visible { outline: 3px solid var(--exp-green); outline-offset: 3px; border-radius: 6px; }

/* The article template drops content inside .spacelr (10px side margins), which
   the negative margin above cancels. The /app/ LISTING page (article_group
   page_detail) prints straight into the column with no .spacelr, so that one
   adds .exp-flush to put the margin back to zero. */
.exp-flush { margin-left: 0; margin-right: 0; }

.exp-container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

/* /app/ listing intro — one short band between the h1 and the article cards */
.exp-applist { padding: clamp(24px, 4vw, 42px) 0 clamp(4px, 1vw, 10px); text-align: center; }
.exp-applist .exp-lede { margin: 0 auto; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.exp .exp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.exp .exp-btn:active { transform: translateY(1px); }
.exp .exp-btn-primary { background: var(--exp-green); color: #fff; box-shadow: 0 6px 18px rgba(64, 140, 64, .28); }
.exp .exp-btn-primary:hover { background: var(--exp-green-dark); color: #fff; }
.exp .exp-btn-ghost { background: transparent; border-color: var(--exp-line); color: var(--exp-ink); }
.exp .exp-btn-ghost:hover { background: rgba(23, 53, 43, .05); color: var(--exp-ink); }
.exp .exp-btn-light { background: var(--exp-lime); color: var(--exp-ink); }
.exp .exp-btn-light:hover { background: #e6f4b8; color: var(--exp-ink); }

.exp .exp-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 24px 11px 20px; border-radius: 14px;
  background: #1e1e1e; color: #fff; text-decoration: none;
}
.exp a.exp-badge { background: #000; transition: transform .15s ease; }
.exp a.exp-badge:hover { color: #fff; transform: translateY(-1px); }
.exp .exp-badge svg { width: 26px; height: 26px; flex: none; }
.exp .exp-badge span { display: block; line-height: 1.15; }
.exp .exp-badge .exp-badge-kicker { font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; opacity: .8; }
.exp .exp-badge .exp-badge-name { font-size: 1.16rem; font-weight: 600; letter-spacing: -.01em; }

/* ==========================================================================
   Hero
   ========================================================================== */
.exp-hero { padding: clamp(28px, 4vw, 52px) 0 clamp(34px, 5vw, 60px); }
.exp-hero-grid {
  display: grid; gap: clamp(30px, 5vw, 62px); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
.exp-tagline {
  font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 700;
  line-height: 1.14; letter-spacing: -.035em; margin: 0 0 .4em; color: var(--exp-ink);
}
.exp-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px;
  padding: 6px 15px 6px 10px; border-radius: 999px;
  background: rgba(64, 140, 64, .1); color: var(--exp-green-dark);
  font-size: .82rem; font-weight: 700;
}
.exp-eyebrow svg { width: 16px; height: 16px; }
.exp-lede { font-size: clamp(1.03rem, 1.9vw, 1.2rem); color: var(--exp-ink-soft); max-width: 34em; }
.exp-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 26px 0 16px; }
.exp-note { font-size: .9rem; color: var(--exp-muted); margin: 0; }
.exp-note b { color: var(--exp-ink); font-weight: 600; }

.exp-hero-art { position: relative; display: flex; justify-content: center; }
.exp-hero-art::before {
  content: ""; position: absolute; inset: 8% -6% 12% -6%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(64, 140, 64, .16), transparent 72%);
}
.exp-phone {
  --exp-phone-w: 300px;
  position: relative; width: var(--exp-phone-w); flex: none;
  padding: 9px; border-radius: 42px;
  background: linear-gradient(160deg, #2b2f2d, #101312 55%, #232726 100%);
  box-shadow: var(--exp-shadow-m), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.exp-phone img { border-radius: 33px; width: 100%; background: #f2f2f7; }
.exp-phone-lg { --exp-phone-w: clamp(258px, 33vw, 336px); }

/* ==========================================================================
   Trust strip
   ========================================================================== */
.exp-trust { border-block: 1px solid var(--exp-line-soft); background: rgba(255, 255, 255, .6); }
.exp-trust ul {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 24px; margin: 0; padding: 22px 0; list-style: none;
}
.exp-trust li {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-size: .92rem; font-weight: 600; color: var(--exp-ink-soft);
}
.exp-trust svg { width: 19px; height: 19px; flex: none; color: var(--exp-green); }

/* ==========================================================================
   Sections
   ========================================================================== */
.exp-section { padding: clamp(44px, 6vw, 84px) 0; }
.exp-section-tight { padding-top: 0; }
.exp-head { max-width: 44rem; margin-bottom: clamp(28px, 4vw, 48px); }
.exp-head-center { margin-inline: auto; text-align: center; }
.exp-head p { color: var(--exp-ink-soft); margin-bottom: 0; font-size: 1.05rem; }
.exp-kicker {
  display: block; margin-bottom: 12px;
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--exp-green-dark);
}

.exp-feature {
  display: grid; gap: clamp(26px, 5vw, 66px); align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: clamp(30px, 5vw, 54px) 0;
}
.exp-feature + .exp-feature { border-top: 1px solid var(--exp-line-soft); }
.exp-feature:nth-of-type(even) .exp-feature-art { order: -1; }
.exp-feature-art { display: flex; justify-content: center; }
.exp-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%;
  background: var(--exp-ink); color: var(--exp-lime); font-size: .9rem; font-weight: 700;
}
.exp-feature-body h3 { font-size: clamp(1.32rem, 2.4vw, 1.72rem); letter-spacing: -.025em; }
.exp-feature-body > p { color: var(--exp-ink-soft); margin-bottom: 0; }
/* NB: the <li> stays in normal inline flow — it carries <b>, <em> and <code>,
   and a flex container would make each of those a separate flex item and pull
   the sentence apart. The tick is positioned instead. */
.exp-points { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.exp-points li { position: relative; margin: 0; padding-left: 28px; font-size: .96rem; color: var(--exp-ink-soft); }
.exp-points svg { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; color: var(--exp-green); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.exp-gallery {
  display: flex; gap: 22px; padding: 6px 0 26px; margin: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.exp-gallery > figure { scroll-snap-align: center; margin: 0; flex: none; width: 232px; }
.exp-gallery .exp-phone { --exp-phone-w: 232px; }
.exp-gallery figcaption {
  margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--exp-ink-soft); text-align: center;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.exp-cards { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.exp-card {
  padding: 26px 24px; border: 1px solid var(--exp-line-soft); border-radius: var(--exp-radius);
  background: var(--exp-paper); box-shadow: var(--exp-shadow-s);
}
.exp-card h3 { font-size: 1.04rem; margin-bottom: .4em; }
.exp-card p { margin: 0; font-size: .94rem; color: var(--exp-ink-soft); }
.exp-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 15px; border-radius: 12px;
  background: rgba(64, 140, 64, .1); color: var(--exp-green-dark);
}
.exp-card-icon svg { width: 21px; height: 21px; }

/* ==========================================================================
   Contact card
   ========================================================================== */
.exp-contact {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  padding: clamp(24px, 4vw, 38px); border-radius: var(--exp-radius-l);
  background: var(--exp-ink); color: #fff;
}
.exp-contact h2 { color: #fff; margin-bottom: .3em; }
.exp-contact p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 40em; font-size: .98rem; }
.exp-contact .exp-btn-light { flex: none; }
.exp-mail { color: var(--exp-lime) !important; font-weight: 700; text-decoration: none; }
.exp-mail:hover { color: #fff !important; text-decoration: underline; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.exp-faq { display: grid; gap: 12px; max-width: 52rem; }
.exp-faq details {
  border: 1px solid var(--exp-line-soft); border-radius: var(--exp-radius);
  background: var(--exp-paper); box-shadow: var(--exp-shadow-s); overflow: hidden;
}
.exp-faq details[open] { border-color: rgba(64, 140, 64, .3); }
.exp-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em;
}
.exp-faq summary::-webkit-details-marker { display: none; }
.exp-faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-right: 2px;
  border-right: 2.5px solid var(--exp-green); border-bottom: 2.5px solid var(--exp-green);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.exp-faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.exp-faq-body { padding: 0 22px 20px; color: var(--exp-ink-soft); font-size: .98rem; }
.exp-faq-body > :last-child { margin-bottom: 0; }

/* ==========================================================================
   Document pages (support intro + privacy policy)
   ========================================================================== */
.exp-doc { max-width: 46rem; font-size: 1.02rem; }
.exp-doc h2 { margin-top: 2em; font-size: clamp(1.28rem, 2.6vw, 1.58rem); }
.exp-doc h2:first-child { margin-top: 0; }
.exp-doc .exp-callout {
  padding: 20px 24px; margin: 0 0 1.6em; border-radius: var(--exp-radius);
  border: 1px solid rgba(64, 140, 64, .28); background: rgba(64, 140, 64, .07);
}
.exp-doc .exp-callout p { margin: 0; }
.exp-doc .exp-callout strong { color: var(--exp-green-dark); }
.exp-meta { margin: 14px 0 0; font-size: .9rem; color: var(--exp-muted); }

/* Cross-links between the three articles are left to the template's own
   "related articles" strip, which already lists the other two pages in the
   group — so there is no .exp-related block here. */

/* ==========================================================================
   Closing CTA
   ========================================================================== */
.exp-cta-band {
  padding: clamp(40px, 6vw, 68px) clamp(24px, 5vw, 60px);
  border-radius: var(--exp-radius-l); text-align: center; color: #fff;
  background:
    radial-gradient(120% 140% at 12% 100%, rgba(64, 140, 64, .5), transparent 60%),
    linear-gradient(150deg, #1d4234, #12281f);
}
.exp-cta-band h2 { color: #fff; }
.exp-cta-band p { color: rgba(255, 255, 255, .8); max-width: 36em; margin-inline: auto; }
.exp-cta-band .exp-cta { justify-content: center; margin-bottom: 6px; }
.exp-cta-band .exp-note { color: rgba(255, 255, 255, .62); }
.exp-cta-band .exp-note b { color: var(--exp-lime); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .exp-hero-grid, .exp-feature { grid-template-columns: minmax(0, 1fr); }
  .exp-hero-art { order: -1; }
  .exp-feature .exp-feature-art,
  .exp-feature:nth-of-type(even) .exp-feature-art { order: -1; }
  .exp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp-trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .exp { font-size: 16px; }
  .exp-cards { grid-template-columns: minmax(0, 1fr); }
  .exp-cta .exp-btn, .exp-cta .exp-badge { width: 100%; }
  .exp-contact { flex-direction: column; align-items: flex-start; }
  .exp-contact .exp-btn-light { width: 100%; }
}

/* Thai pages get Noto Sans Thai first and a little more line height.
   engine.php emits lang="th-TH", hence the prefix match; .exp-th on the
   wrapper is the one that actually does the work. */
html[lang^="th"] .exp,
.exp-th {
  font-family: "Noto Sans Thai", "Sarabun", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.8;
}
.exp-th h2, .exp-th h3, .exp-th h4, .exp-th .exp-tagline { line-height: 1.4; letter-spacing: 0; }

@media print {
  .exp-cta-band, .exp-cta, .exp-gallery { display: none !important; }
  .exp { background: #fff; font-size: 12pt; }
}
