/* ═══════════════════════════════════════════════════════════════
   BC Account — styles.css  (Production — Synthesized Design)
   Display font : Anuphan (headings) — Google Fonts
   Body font    : IBM Plex Sans Thai (body) — Google Fonts
   Fallbacks    : Tahoma, Leelawadee UI, Noto Sans Thai, Arial
   Shared by    : index.html · features.html · pricing.html
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Brand colors sampled from the BC Ai Cloud seal. */
  --brand:        #a43f2b;
  --brand-dark:   #7f2f21;
  --brand-mid:    #c46549;
  --brand-light:  #69d4e7;
  --brand-soft:   #f7e9e3;
  --brand-glow:   rgba(164, 63, 43, 0.20);
  --cyan:         #198fbd;
  --cyan-dark:    #0d6f99;
  --cyan-soft:    #e5f5f8;

  /* Hero canvas */
  --hero-bg-start: #0d304b;
  --hero-bg-end:   #0d304b;

  /* Neutrals */
  --ink:    #172633;
  --muted:  #52636f;
  --paper:  #fbfcfc;
  --soft:   #f2f6f7;
  --soft-2: #f8f2e7;
  --line:   #d8e1e5;
  --navy:   #0d304b;

  /* Warm accent from the hand-drawn seal. */
  --accent:       #9b3b28;
  --accent-soft:  #fbf2e8;
  --green-delta:  #059669;
  --warn-delta:   #b45309;

  /* Pricing featured tile */
  --featured-bg:      #102f48;
  --featured-border:  rgba(105, 212, 231, 0.34);
  --featured-price:   #8ce5f1;
  --featured-muted:   rgba(255, 255, 255, 0.70);

  /* Contact section */
  --contact-bg:  #102f48;

  /* Shadows */
  --shadow:    0 22px 52px rgba(13, 48, 75, 0.13);
  --shadow-sm: 0 8px 24px rgba(13, 48, 75, 0.07), 0 1px 2px rgba(13, 48, 75, 0.05);

  /* Layout */
  --max: 1180px;
  --r:   0.5rem;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Sans Thai", Tahoma, "Leelawadee UI", "Noto Sans Thai", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

p {
  margin-top: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── Skip link ───────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 0.35rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 1rem;
}

/* ── Navigation ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid rgba(164, 63, 43, 0.20);
  background: rgba(255, 255, 253, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(13, 48, 75, 0.06);
}

/* Visible on every page so users and crawlers see the current product status. */
.development-notice {
  border-bottom: 1px solid rgba(164, 63, 43, 0.22);
  background: #fbf3e8;
  color: #633427;
}

.development-notice__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 0.94rem;
}

.development-notice strong {
  flex: 0 0 auto;
  color: var(--brand-dark);
}

.development-status {
  text-align: center;
}

.development-status .lead {
  margin-right: auto;
  margin-left: auto;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.62rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  color: var(--navy);
  font-family: "Anuphan", "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
  flex-shrink: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 7px 20px rgba(13, 48, 75, 0.18), 0 0 0 1px rgba(164, 63, 43, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  /* Allow shrink/wrap on narrow screens */
  flex-wrap: wrap;
}

.nav-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-bottom: 2px solid transparent;
  border-radius: 0.35rem;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--brand);
  background: #fbf2e8;
  color: var(--brand-dark);
  outline: none;
}

/* ── Typography (Anuphan for headings) ───────────────────────── */
h1, h2, h3 {
  font-family: "Anuphan", "IBM Plex Sans Thai", Tahoma, sans-serif;
  letter-spacing: 0;
  line-height: 1.22;
}

h2 {
  margin: 0 0 0.7rem;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

h3 {
  margin: 0.85rem 0 0.4rem;
  color: var(--navy);
  font-size: 1.13rem;
}

/* Eyebrow: outline-pill style from D2 — calmer, premium */
.eyebrow {
  width: fit-content;
  margin: 0 0 0.75rem;
  padding: 0.26rem 0.78rem;
  border: 1.5px solid rgba(25, 143, 189, 0.30);
  border-radius: 999px;
  background: transparent;
  color: var(--cyan-dark);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.button,
.contact-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  border-radius: 0.5rem;
  font-family: "Anuphan", "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.button.primary {
  border: 1px solid var(--brand-dark);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(164, 63, 43, 0.16);
}

.contact-link {
  border: 1px solid var(--brand-dark);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(164, 63, 43, 0.16);
}

.button.secondary {
  border: 1px solid rgba(13, 48, 75, 0.35);
  background: #fff;
  color: var(--navy);
}

.button:hover,
.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 48, 75, 0.13);
}

.button.primary:hover,
.contact-link:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  box-shadow: 0 12px 28px rgba(164, 63, 43, 0.20);
}

.button:focus-visible,
.contact-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.1rem 0 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED CARD / PANEL — single grouped border/radius/shadow rule
   (covers index, features, pricing subpages uniformly)
   ═══════════════════════════════════════════════════════════════ */
.metric-list div,
.answer-band aside,
.card,
.price-card,
.feature-list article,
.faq-list details,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — solid navy canvas with the warm seal color as a keyline
   ═══════════════════════════════════════════════════════════════ */
.hero {
  border-top: 1px solid rgba(105, 212, 231, 0.18);
  background: var(--hero-bg-start);
  box-shadow: inset 0 4px 0 var(--brand);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 2rem;
  min-height: 0;
}

/* Hero article wraps hero-inner at full width */
article.hero {
  max-width: none;
}

/* Undo old max-width constraint — hero-inner handles it */
.hero-copy {
  /* copy inherits from hero-inner grid cell */
}

.hero-copy h1,
.page-article h1 {
  margin: 0.3rem 0 1rem;
  max-width: 820px;
  color: #ffffff;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
}

.page-article h1 {
  color: var(--navy);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.hero-copy .eyebrow {
  border-color: rgba(105, 212, 231, 0.55);
  background: rgba(25, 143, 189, 0.16);
  color: #9eeaf3;
}

.hero-copy .lead {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.hero-copy .button.secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero-copy .button.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ── Metric pills (glass-pill on dark hero) ──────────────────── */
.metric-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 560px;
}

.metric-list div {
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(105, 212, 231, 0.20);
  border-radius: var(--r);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.metric-list dt {
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.metric-list dd {
  margin: 0.15rem 0 0;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.97rem;
}

/* ═══════════════════════════════════════════════════════════════
   HERO MEDIA — CSS Dashboard Mock on deep-teal canvas
   ═══════════════════════════════════════════════════════════════ */
.hero-media {
  position: relative;
  margin: 0;
  border: 1px solid rgba(105, 212, 231, 0.34);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 3px rgba(164, 63, 43, 0.10);
}

figcaption {
  padding: 0.65rem 1rem;
  background: #f3f6f9;
  color: var(--muted);
  font-size: 0.80rem;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

/* Chrome window frame */
.dash-chrome {
  background: #142c40;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.dash-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: #0a2135;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-dot--red    { background: #ff5f57; }
.dash-dot--yellow { background: #ffbd2e; }
.dash-dot--green  { background: #28c840; }

.dash-title {
  flex: 1;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.72rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.dash-badge {
  color: #8ce5f1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Sidebar + main layout */
.dash-layout {
  display: flex;
  min-height: 340px;
}

.dash-sidebar {
  width: 88px;
  flex-shrink: 0;
  background: #0b2438;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.9rem 0 0.6rem;
}

.dash-sidebar-logo {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: var(--brand);
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(164, 63, 43, 0.38);
}

.dash-sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
}

.dash-sidebar li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  padding: 0.5rem 0.3rem;
  border-radius: 0.4rem;
  margin: 0 0.4rem;
  color: rgba(255,255,255,0.38);
  font-size: 0.6rem;
  font-weight: 600;
  cursor: default;
  transition: background 0.12s;
}

.dash-sidebar li.dash-active {
  background: rgba(25, 143, 189, 0.22);
  color: #8ce5f1;
}

/* Main dashboard area */
.dash-main {
  flex: 1;
  background: #17354c;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
}

/* KPI row */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.dash-kpi {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.55rem;
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-kpi-label {
  color: rgba(255,255,255,0.45);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-kpi-value {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.dash-kpi-delta {
  font-size: 0.58rem;
  font-weight: 600;
}

.dash-kpi-delta--up   { color: #69d4e7; }
.dash-kpi-delta--warn { color: #fbbf24; }

.dash-kpi--sales  { border-top: 2px solid #69d4e7; }
.dash-kpi--profit { border-top: 2px solid #c46549; }
.dash-kpi--stock  { border-top: 2px solid #e0b85b; }

/* Bottom row: chart + invoice */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 0.5rem;
  flex: 1;
}

/* Bar chart card */
.dash-chart-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.55rem;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.dash-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-chart-header span:first-child {
  color: rgba(255,255,255,0.65);
  font-size: 0.68rem;
  font-weight: 600;
}

.dash-chart-tag {
  background: rgba(25, 143, 189, 0.18);
  color: #8ce5f1;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.dash-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 90px;
  padding-bottom: 1.2rem;
  position: relative;
}

.dash-bar-chart::before {
  content: "";
  position: absolute;
  inset: 0 0 1.2rem;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.05) 1px,
    transparent 1px,
    transparent 25%
  );
  pointer-events: none;
}

.dash-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  height: 100%;
  justify-content: flex-end;
}

.dash-bar {
  width: 100%;
  height: var(--h);
  background: rgba(105, 212, 231, 0.32);
  border-radius: 3px 3px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.dash-bar--today {
  background: #c46549;
  box-shadow: 0 0 10px rgba(196, 101, 73, 0.38);
}

/* Always-visible bar values (fix: visible on all bars, not just hover) */
.dash-bar-val {
  color: rgba(255,255,255,0.85);
  font-size: 0.5rem;
  margin-top: 0.1rem;
  font-weight: 700;
  pointer-events: none;
}

.dash-bar-lbl {
  color: rgba(255,255,255,0.40);
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Invoice mini-card */
.dash-invoice-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.55rem;
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dash-invoice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.dash-invoice-title {
  color: rgba(255,255,255,0.6);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-invoice-status {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.dash-invoice-status--paid {
  background: rgba(52,211,153,0.18);
  color: #34d399;
}

.dash-invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dash-invoice-field {
  color: rgba(255,255,255,0.35);
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
}

.dash-invoice-value {
  color: rgba(255,255,255,0.75);
  font-size: 0.62rem;
  font-weight: 600;
  text-align: right;
}

.dash-invoice-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.25rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.dash-invoice-total span:first-child {
  color: rgba(255,255,255,0.45);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-invoice-amount {
  color: #8ce5f1;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ANSWER BAND
   ═══════════════════════════════════════════════════════════════ */
.answer-band,
.contact-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.8rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 1.4rem;
}

.answer-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.answer-band h2,
.contact-section h2 {
  margin-top: 0;
}

/* AI-agent aside with warm gold/coral left-rule accent (from D2) */
.answer-band aside,
.ai-agent-aside {
  padding: 1rem 1rem 1rem 1.2rem;
  background: var(--accent-soft);
  border: 1px solid rgba(164, 63, 43, 0.20);
  border-left: 4px solid var(--accent);  /* left-rule editorial accent */
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}

.answer-band aside strong,
.ai-agent-aside strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.answer-band aside p,
.ai-agent-aside p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.tinted {
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.tinted > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.section-heading > h1 {
  max-width: 1060px;
  margin: 0.35rem 0 1rem;
  color: var(--navy);
  font-size: clamp(2.15rem, 4.2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.14;
}

.section-heading > p:has(> .button) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.page-intro {
  max-width: none;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.page-intro > .section-heading {
  max-width: var(--max);
  margin: 0 auto;
}

.page-intro .lead {
  max-width: 800px;
}

/* ── Solution Cards ──────────────────────────────────────────── */
.card-grid,
.price-grid,
.feature-list {
  display: grid;
  gap: 1.1rem;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid:has(> :only-child) {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.card-grid:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 560px));
  justify-content: center;
}

.price-grid,
.feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.price-card,
.feature-list article,
.faq-list details,
.content-panel {
  padding: 1.25rem;
  overflow-wrap: anywhere;
}

.card {
  overflow: hidden;
  padding: 0;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(25, 143, 189, 0.28);
  box-shadow: var(--shadow);
}

.card h3,
.card p {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.card p {
  padding-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.68;
}

.card h3 a {
  color: var(--navy);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.card h3 a:hover,
.card h3 a:focus {
  color: var(--brand-dark);
  text-decoration: underline;
  text-decoration-color: var(--brand-mid);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card:not(:has(> img)) {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-top: 3px solid rgba(25, 143, 189, 0.34);
}

.card:not(:has(> img)) h3,
.card:not(:has(> img)) > p {
  padding-right: 0;
  padding-left: 0;
}

.card:not(:has(> img)) h3 {
  margin-top: 0;
}

.card:not(:has(> img)) > p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 0.35rem;
  padding-bottom: 0;
}

.card:not(:has(> img)) > p:last-child a:not(.button) {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.card:not(:has(> img)) > p:last-child a:not(.button):hover,
.card:not(:has(> img)) > p:last-child a:not(.button):focus {
  text-decoration: underline;
  text-decoration-color: var(--brand-mid);
  text-underline-offset: 0.2em;
}

/* ── Product showcase ────────────────────────────────────────── */
.product-showcase-grid {
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.product-card {
  --product-accent: var(--cyan);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 3px solid var(--product-accent);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.product-card--pos {
  --product-accent: var(--brand);
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--product-accent) 42%, var(--line));
  box-shadow: var(--shadow);
}

.product-card__media {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.product-card--account .product-card__media {
  object-position: center 54%;
}

.product-card--pos .product-card__media {
  object-position: center 58%;
}

.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
}

.product-card__type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  color: var(--product-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.product-card__type::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.product-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.55rem;
}

.product-card h3 a {
  color: var(--navy);
  text-decoration: none;
}

.product-card h3 a:hover,
.product-card h3 a:focus {
  color: var(--brand-dark);
}

.product-card__summary {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.product-status-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.product-status-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.64rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.product-status-list strong {
  width: fit-content;
  padding: 0.14rem 0.42rem;
  border-radius: 0.25rem;
  font-size: 0.73rem;
  line-height: 1.45;
  white-space: nowrap;
}

.status-building {
  background: var(--cyan-soft);
  color: var(--cyan-dark);
}

.status-testing {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.status-research {
  background: #fff3d6;
  color: #79551b;
}

.status-planning {
  background: #edf1f3;
  color: #465966;
}

.product-card__action {
  margin: auto 0 0;
  padding-top: 1.35rem;
}

.product-card__action .button {
  min-width: 230px;
}

/* ── Feature list — left-rule accent (from D2 graft) ────────── */
.feature-list article {
  min-height: 0;
  border-top: none;
  border-left: 4px solid var(--brand);
  padding: 1.25rem 1.25rem 1.25rem 1.45rem;
  transition: transform 0.18s, box-shadow 0.18s;
}

.feature-list article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-list article h3 {
  margin-top: 0;
}

.feature-list article p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Pricing Cards ───────────────────────────────────────────── */
.price-card {
  position: relative;
  min-height: 0;
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.price-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.price-card-icon {
  color: var(--cyan-dark);
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.price-card h3 {
  margin: 0 0 0.2rem;
}

.price-card p:last-child {
  color: var(--muted);
  font-size: 0.93rem;
  margin: 0;
}

/* Price number — gold/ochre WCAG-AA on white */
.price {
  margin: 0.4rem 0 0.6rem;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
  font-family: "Anuphan", "IBM Plex Sans Thai", Tahoma, sans-serif;
}

.price--contact {
  font-size: 1.25rem;
  color: var(--muted);
}

/* Featured pricing card — dark teal-navy (from D1 graft) */
.price-card.featured {
  background: var(--featured-bg);
  border: 1px solid var(--featured-border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(105, 212, 231, 0.16);
}

.price-card.featured::before {
  content: "นิยมเริ่มต้น";
  position: absolute;
  right: 1rem;
  top: 1rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.price-card.featured h3 {
  color: #ffffff;
}

.price-card.featured .price-card-icon {
  color: var(--brand-light);
  opacity: 1;
}

/* Featured price number in light teal on dark bg */
.price-card.featured .price {
  color: var(--featured-price);
  font-size: 1.65rem;
}

.price-card.featured p:last-child {
  color: var(--featured-muted);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  transition: box-shadow 0.15s;
}

.faq-list details[open] {
  border-color: rgba(25, 143, 189, 0.30);
  box-shadow: 0 6px 22px rgba(13, 48, 75, 0.10);
}

summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: "+";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cyan-soft);
  color: var(--cyan-dark);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

details[open] summary::before {
  content: "−";
  background: var(--cyan-dark);
  color: #fff;
}

details p {
  margin: 0.65rem 0 0;
  padding-left: 1.9rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ── Contact — solid navy section ───────────────────────────── */
.contact-section {
  max-width: none;
  background: var(--contact-bg);
  border-top: 4px solid var(--brand);
  border-bottom: none;
  padding: 2.75rem 1.25rem;
}

.contact-section-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 2rem;
  align-items: start;
}

/* Override answer-band grid — contact uses .contact-section-inner */
section.contact-section {
  display: block;
}

.contact-section .eyebrow {
  border-color: rgba(105, 212, 231, 0.45);
  background: rgba(25, 143, 189, 0.16);
  color: #9eeaf3;
}

.contact-section h2 {
  color: #ffffff;
  margin-top: 0;
}

.contact-section > p,
.contact-section-inner > div > p {
  color: rgba(255,255,255,0.75);
}

address {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  font-style: normal;
}

.contact-link {
  border-radius: 0.5rem;
  gap: 0.5rem;
  background: var(--brand);
  border-color: #d98265;
}

.contact-link:hover {
  background: var(--brand-dark);
}

/* ── Page article (features.html, pricing.html) ──────────────── */
.page-article {
  max-width: 1020px;
}

.page-article > .lead {
  margin-bottom: 2rem;
}

.page-article section {
  margin-top: 1rem;
}

.content-panel {
  min-width: 0;
  padding: 1.4rem 1.65rem;
}

.content-panel h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
}

/* ── Footer — teal family links (fix: was sky-blue #7dd3fc) ─── */
.site-footer {
  padding: 2.25rem max(1.25rem, calc((100vw - var(--max)) / 2 + 1.25rem)) 1.25rem;
  background: var(--navy);
  color: #fff;
  border-top: 1px solid rgba(105, 212, 231, 0.28);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(5, 1fr);
  gap: 1.6rem 1.25rem;
}

.footer-brand strong,
.footer-col strong {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 1rem;
  font-family: "Anuphan", "IBM Plex Sans Thai", Tahoma, sans-serif;
  letter-spacing: 0;
  color: #fff;
}

.footer-brand p {
  max-width: 340px;
  margin: 0.35rem 0 0;
  color: #b8c6cf;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-brand .footer-contact a {
  color: #8ce5f1;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.site-footer a {
  color: #cbd5e1;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
  width: fit-content;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #8ce5f1;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.82rem;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — 900px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.65rem;
    /* allow wrapping on medium screens instead of overflow */
    flex-wrap: wrap;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
    gap: 1.75rem;
  }

  .hero-media {
    max-width: 580px;
  }

  .answer-band {
    grid-template-columns: 1fr;
  }

  .contact-section-inner {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid:has(> :only-child),
  .card-grid:has(> :nth-child(2):last-child),
  .price-grid,
  .feature-list,
  .product-showcase-grid {
    grid-template-columns: 1fr;
  }

  .product-showcase-grid {
    max-width: 680px;
  }

  .metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .dash-layout {
    min-height: 280px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — 640px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .dash-sidebar {
    width: 60px;
  }

  .dash-sidebar li {
    font-size: 0.5rem;
  }

  .dash-kpi-value {
    font-size: 0.85rem;
  }

  .dash-bottom-row {
    grid-template-columns: 1fr;
  }

  .dash-invoice-card {
    display: none; /* hide on small screens to keep chart readable */
  }

  .dash-bar-chart {
    height: 72px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — 520px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  .hero-inner,
  .section,
  .answer-band,
  .contact-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .page-intro {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .hero-media,
  .hero .metric-list {
    display: none;
  }

  .product-card__body {
    padding: 1.25rem;
  }

  .product-status-list li {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy h1,
  .page-article h1 {
    font-size: 1.85rem;
  }

  .nav-links a {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    font-size: 0.85rem;
  }

  .contact-section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — 400px (mobile-S from D2)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  .button,
  .contact-link {
    width: 100%;
  }

  .cta-row {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Focus styles — WCAG AA
   ═══════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Global brand guardrails ───────────────────────────────────
   A few long-form pages have legacy page-level CSS. These focused
   overrides keep the shared identity consistent without flattening
   their article-specific diagrams and tables. */
body .site-header {
  border-top: 3px solid var(--brand) !important;
  border-bottom: 1px solid rgba(164, 63, 43, 0.20) !important;
  background: rgba(255, 255, 253, 0.97) !important;
  box-shadow: 0 8px 28px rgba(13, 48, 75, 0.06) !important;
}

body .site-header .nav {
  max-width: var(--max) !important;
  padding: 0.62rem 1.25rem !important;
}

body .site-header .brand {
  gap: 0.78rem !important;
  color: var(--navy) !important;
  font-family: Tahoma, "Leelawadee UI", Arial, sans-serif !important;
  font-weight: 700 !important;
}

body .site-header .brand img {
  width: 54px !important;
  height: 54px !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  box-shadow: 0 7px 20px rgba(13, 48, 75, 0.18), 0 0 0 1px rgba(164, 63, 43, 0.22) !important;
}

body .site-header .nav-links {
  display: grid !important;
  grid-template-columns: repeat(7, 5.5rem) !important;
  gap: 0.12rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body .site-header .nav-links a {
  width: 100% !important;
  min-height: 40px !important;
  justify-content: center !important;
  padding: 0.4rem 0.85rem !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0.35rem !important;
  color: var(--muted) !important;
  font-family: Tahoma, "Leelawadee UI", Arial, sans-serif !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  transition: none !important;
}

body .site-header .nav-links a:hover,
body .site-header .nav-links a:focus,
body .site-header .nav-links a[aria-current="page"] {
  border-bottom-color: var(--brand) !important;
  background: #fbf2e8 !important;
  color: var(--brand-dark) !important;
}

body .development-notice {
  border-bottom-color: rgba(164, 63, 43, 0.22) !important;
  background: #fbf3e8 !important;
  color: #633427 !important;
}

body .development-notice strong {
  color: var(--brand-dark) !important;
}

body .article-hero,
body .page-hero,
body .blog-hero,
body .dev-hero {
  border-top: 1px solid rgba(105, 212, 231, 0.20) !important;
  background: var(--navy) !important;
  color: #fff !important;
  box-shadow: inset 0 4px 0 var(--brand) !important;
}

body .article-hero :is(h1, h2),
body .page-hero :is(h1, h2),
body .blog-hero :is(h1, h2),
body .dev-hero :is(h1, h2) {
  color: #ffffff !important;
}

body .article-hero .back-link,
body .page-hero .back-link,
body .dev-hero .dev-back-link {
  color: #8ce5f1 !important;
}

body .article-hero .standfirst,
body .page-hero .lead,
body .blog-hero .lead,
body .dev-hero .lead {
  color: rgba(255, 255, 255, 0.78) !important;
}

body .article-hero .tag,
body .article-hero .article-tag,
body .blog-hero .eyebrow-badge,
body .dev-hero .dev-badge {
  border-color: rgba(105, 212, 231, 0.38) !important;
  background: rgba(25, 143, 189, 0.17) !important;
  color: #9eeaf3 !important;
}

body .site-footer {
  border-top: 1px solid rgba(105, 212, 231, 0.28) !important;
  background: var(--navy) !important;
}

body .site-footer a:hover,
body .site-footer a:focus {
  color: #8ce5f1 !important;
}

body .blog-card-cta,
body .related-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

body summary {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
}

body .article-card,
body .prose-content,
body .content-panel {
  min-width: 0;
  overflow-wrap: anywhere;
}

body .table-wrap,
body pre {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

body .table-wrap {
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

body :not(pre) > code {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  body .site-header .nav {
    height: auto !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
  }

  body .site-header .nav-links {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 0.2rem !important;
  }
}

@media (max-width: 640px) {
  body .site-header .nav-links {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body .site-header .brand img {
    width: 54px !important;
    height: 54px !important;
  }

  body .site-header .nav-links a {
    min-height: 44px !important;
    padding: 0.48rem 0.68rem !important;
    font-size: 0.84rem !important;
  }

  body .card:not(:has(> img)),
  body .price-card,
  body .faq-list details {
    padding: 1.25rem;
  }

  body .feature-list article {
    padding: 1.25rem 1.25rem 1.25rem 1.4rem;
  }

  body .content-panel,
  body .article-card,
  body .prose-content {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }
}
