/* =========================================================
   AI & IoT pages of pattern F (2026-11-02): overview (ai-iot.html) + service pages (ai-iot-*.html).
   Loaded only on those pages, after F/style.css. Rules from the user's review: body text 16px (captions .875rem
   only), every block at the full content width, a product band under the compact hero (client rule: keep the
   text + photo hero layout), photo cards, and one signature section per service. The client's demo screens keep
   their own look (ai-iot-demos.css, scoped to .aiq-demo).
   ========================================================= */
.ai-page p, .ai-page li { font-size: 1rem; }
.ai-page .ai-sec { padding: clamp(44px, 4.5vw, 64px) 0; }
.ai-ico { width: 24px; height: 24px; flex: 0 0 auto; color: var(--blue); }
/* larger line icon with a pale spot behind it (problem cards in orange, security points in blue) */
.ai-duo { width: 40px; height: 40px; flex: 0 0 auto; color: var(--blue); }
.ai-duo .tone { fill: #D6E5FF; stroke: none; }

/* hero (compact) + product band */
.v-f .ai-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(220px, 18vw, 280px); overflow-x: clip; }
.v-f .ai-hero .dm-hero-copy { padding-top: clamp(24px, 2.6vw, 40px); padding-bottom: clamp(24px, 2.6vw, 40px); }
.v-f .ai-hero h1 { font-size: clamp(1.75rem, 1rem + 2vw, 2.75rem); line-height: 1.2; }
html:lang(th) .v-f .ai-hero h1 { font-size: clamp(1.5rem, .9rem + 1.6vw, 2.25rem); line-height: 1.35; }
.v-f .ai-hero .dm-text { margin-top: 12px; font-size: 1rem; }
.v-f .ai-hero .dm-hero-img { overflow: hidden; }
.ai-hero-cta { margin-top: 18px; }
.ai-hero-cta .e-btn { width: auto; min-height: 46px; }
.ai-brand { border-bottom: 1px solid var(--line); background: #fff; }
.ai-brand .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.ai-brand.no-tile .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.ai-brand-tile { display: flex; align-items: center; justify-content: center; min-width: 200px; min-height: 80px; padding: 16px 24px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ai-brand-tile img { max-height: 40px; width: auto; }
.ai-brand-tile strong { color: var(--ink); font: 700 1.125rem/1.4 var(--fx-font); text-align: center; }
.ai-eyebrow { margin: 0 0 4px; color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; line-height: 1.5; text-transform: uppercase; }
.ai-brand-name { color: var(--ink); font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
.ai-brand-name span { color: var(--muted); font-size: 1rem; font-weight: 500; }
.ai-brand-who { padding-left: 32px; border-left: 1px solid var(--line); }
.ai-brand-who p + p { color: var(--text); line-height: 1.7; }
/* section heads */
.ai-sec h2 { overflow-wrap: anywhere; }
.ai-head { margin-bottom: clamp(24px, 3vw, 36px); }
.ai-head .e-h2 { margin-bottom: 0; }
.ai-lead { max-width: 52em; margin-top: 10px; color: var(--muted); }

/* the problem */
.ai-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.ai-split .ai-head { margin-bottom: 0; }
.ai-pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-pains li { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font-weight: 500; }
.ai-pain-ico { margin-top: -2px; color: var(--cta-deep); }
.ai-pain-ico .tone { display: none; }      /* no spot behind the problem icons: it read as a shadow (review 2026-11-05) */

/* how it works: steps beside the demo, both at the full width */
.ai-how.has-demo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.ai-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ai-how:not(.has-demo) .ai-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ai-steps li { display: flex; gap: 16px; padding: 20px; border-radius: var(--r); background: #fff; }
.ai-how:not(.has-demo) .ai-steps li { flex-direction: column; gap: 8px; }
.ai-step-no { color: var(--blue); font: 700 1.375rem/1 var(--fx-font); }
.ai-steps h3 { font-size: 1.125rem; }
.ai-steps p { margin-top: 4px; color: var(--muted); }
.ai-demo { width: 100%; margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.ai-demo figcaption { padding: 10px 16px 12px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.ai-demo[data-demo$="-ui"] svg.aiq-svg { box-sizing: border-box; padding: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px) 4px; }
.ai-demo[data-demo$="-ui"] figcaption { padding-left: clamp(14px, 2vw, 24px); padding-right: clamp(14px, 2vw, 24px); padding-bottom: 16px; }
.ai-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 2.6vw, 36px); margin: 24px 0 0; padding: clamp(22px, 2.4vw, 30px) clamp(24px, 3vw, 40px);
  border-radius: 16px; background: var(--blue); color: #fff; }
.ai-stat b { font: 700 clamp(2rem, 1.1rem + 2.6vw, 3.5rem)/1.05 var(--fx-font); letter-spacing: -.02em; white-space: nowrap; }
.ai-page .ai-stat > span { display: flex; align-items: center; align-self: stretch; padding-left: clamp(20px, 2.6vw, 36px); border-left: 1px solid rgba(255, 255, 255, .45); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); font-weight: 500; line-height: 1.5; }
html:lang(th) .ai-stat b { letter-spacing: 0; line-height: 1.3; }
/* with parts (review 2026-11-05: one sentence in a wide band looked empty): the big word with its short tail on the left,
   then what it covers as cells across the rest of the band, split by hairlines; white line icons, no tiles */
.ai-stat.has-items { align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.ai-stat-k { display: flex; flex-direction: column; justify-content: center; gap: 6px; margin: 0; padding: clamp(24px, 2.6vw, 34px) clamp(24px, 3vw, 40px); background: rgba(0, 20, 70, .22); }
.ai-page .ai-stat-k > span { color: rgba(255, 255, 255, .88); font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
.ai-stat-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ai-stat-items li { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.4vw, 30px) clamp(18px, 2.2vw, 28px); border-left: 1px solid rgba(255, 255, 255, .28); }
.ai-stat-items li:first-child { border-left: 0; }
.ai-stat-ico { flex: none; width: 44px; height: 44px; color: #fff; }
.ai-stat-items strong { display: block; color: #fff; font: 700 1.25rem/1.3 var(--fx-font); }
html:lang(th) .ai-stat-items strong { line-height: 1.45; }
.ai-page .ai-stat-items li span:not(.ai-stat-no) { display: block; margin-top: 4px; color: rgba(255, 255, 255, .88); font-size: 1rem; line-height: 1.5; }
/* no icons: a numbered list in two rows (the six KPIs) */
.ai-stat.is-list .ai-stat-items li { flex-direction: row; align-items: baseline; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.ai-stat.is-list .ai-stat-items li:nth-child(3n + 1) { border-left: 0; }
.ai-stat.is-list .ai-stat-items li:nth-child(n + 4) { border-top: 1px solid rgba(255, 255, 255, .28); }
.ai-stat-no { color: rgba(255, 255, 255, .75); font: 700 1.125rem/1.3 var(--fx-font); font-variant-numeric: tabular-nums; }
.ai-stat.is-list .ai-stat-items strong { font-size: 1.125rem; }

/* generic item grids */
.ai-items { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ai-items li { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ai-items h4 { color: var(--ink); font-size: 1.0625rem; }
.ai-items p { margin-top: 6px; color: var(--muted); }
.ai-nums { margin-top: 24px; }
.ai-nums h3 { color: var(--blue); font-size: 1.25rem; }

/* ---- signature sections ---- */
/* platform: 4 tools + security shield */
.ai-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-tool { padding: 24px; border-top: 4px solid var(--blue); border-radius: var(--r); background: var(--soft); }
.ai-tool .ai-ico { width: 32px; height: 32px; margin-bottom: 14px; }
.ai-tool h3 { font-size: 1.125rem; }
.ai-tool p { margin-top: 8px; color: var(--muted); }
.ai-shield { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ai-shield li { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; padding: 20px 22px; border-radius: var(--r); background: #fff; }
.ai-shield .ai-duo { grid-row: 1 / span 2; align-self: center; width: 52px; height: 52px; }
.ai-shield strong { align-self: end; color: var(--ink); font-size: 1.0625rem; }
.ai-shield span { align-self: start; color: var(--muted); font-size: .9375rem; }
/* agents: goal → agent → delivered, with big screenshots */
.ai-flow-rows { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.ai-flow-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: 24px; border-radius: 16px; background: #fff; }
.ai-flow-no { display: block; margin-bottom: 8px; color: var(--blue); font: 700 1.5rem/1 var(--fx-font); }
.ai-flow-copy h3 { font-size: 1.375rem; }
.ai-flow-copy p { margin-top: 8px; color: var(--muted); }
.ai-shot { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #F5F5F7; }
.ai-shot img { width: 100%; }
/* training: two stages */
.ai-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-stage { position: relative; padding: 28px 28px 28px 96px; border-radius: var(--r); background: #fff; }
.ai-stage-no { position: absolute; left: 28px; top: 24px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 1.5rem/1 var(--fx-font); }
.ai-stage h3 { font-size: 1.25rem; }
.ai-stage p { margin-top: 8px; color: var(--muted); }
/* safety: 9 PPE icons + the big number */
.ai-ppe-wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 20px; align-items: stretch; }
.ai-ppe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ai-ppe li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font-weight: 500; }
.ai-ppe .ai-ico { width: 28px; height: 28px; }
.ai-big { display: flex; flex-direction: column; justify-content: center; padding: 28px; border-radius: var(--r); background: var(--blue); color: #fff; }
.ai-big-k { font-size: .9375rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.ai-big b { font: 700 clamp(4rem, 2rem + 6vw, 7rem)/1 var(--fx-font); }
.ai-big-u { font-size: 1.25rem; font-weight: 700; }
.ai-big p { margin-top: 12px; color: rgba(255, 255, 255, .85); }
/* inspection: project stories as photo cards */
.ai-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.ai-story { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ai-story img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.ai-story > div { padding: 20px 22px 22px; }
.ai-story h3 { font-size: 1.125rem; }
.ai-story p { margin-top: 6px; color: var(--muted); }
.ai-story-text { justify-content: center; background: var(--blue-pale); border-color: transparent; }
/* sop: roles (icons) + trial timeline */
.ai-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-roles li { padding: 22px; border-radius: var(--r); background: #fff; }
.ai-roles .ai-ico { width: 32px; height: 32px; margin-bottom: 12px; }
.ai-roles h3 { font-size: 1.0625rem; }
.ai-roles p { margin-top: 6px; color: var(--muted); }
.ai-tl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.ai-tl li { position: relative; padding: 22px 24px 22px 0; border-top: 3px solid var(--blue); }
.ai-tl li + li { padding-left: 24px; }
.ai-tl li::before { content: ""; position: absolute; top: -8px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--blue); }
.ai-tl li + li::before { left: 24px; }
.ai-tl-no { display: block; margin-bottom: 8px; color: var(--blue); font: 700 1.375rem/1 var(--fx-font); letter-spacing: -.02em; }
.ai-tl h3 { font-size: 1.125rem; }
.ai-tl p { margin-top: 6px; color: var(--muted); }
.ai-tl-note { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 14px 18px; border-radius: var(--r); background: #fff; color: var(--muted); }
.ai-tl-note strong { color: var(--ink); }
/* evacuation: phases + connections */
.ai-phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: ph; }
.ai-phase { position: relative; overflow: hidden; border-radius: 16px; background: #fff; }
.ai-phase img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.ai-phase > div { padding: 20px 22px 24px; }
.ai-phase h3 { font-size: 1.25rem; }
.ai-phase p { margin-top: 6px; color: var(--muted); }
.ai-conn { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.ai-conn li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); }
.ai-conn strong { color: var(--ink); }
.ai-conn span { color: var(--muted); font-size: .9375rem; }
/* inventory: mats to scale */
.ai-mats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-mats li { display: flex; flex-direction: column; align-items: flex-start; padding: 22px; border-radius: var(--r); background: #fff; }
.ai-mats li:nth-child(1) .ai-mat { background: #0B3FA8; } .ai-mats li:nth-child(2) .ai-mat { background: #166DFF; }
.ai-mats li:nth-child(3) .ai-mat { background: #5C9CFF; } .ai-mats li:nth-child(4) .ai-mat { background: #9CC3FF; }
.ai-mat { display: grid; place-items: center; max-width: 100%; margin-bottom: 16px; border-radius: 6px; color: #fff; font: 700 .875rem/1 var(--fx-font); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.ai-mats h3 { font-size: 1.0625rem; }
.ai-mats p { margin-top: 6px; color: var(--muted); }
/* energy: without vs with */
.ai-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ai-cmp { padding: 28px; border-radius: 16px; background: #fff; }
.ai-cmp h3 { font-size: 1.0625rem; color: var(--muted); }
.ai-cmp b { display: block; margin-top: 8px; font: 700 clamp(3rem, 2rem + 3vw, 4.5rem)/1 var(--fx-font); }
.ai-cmp-off b { color: #3B6FB6; } .ai-cmp-on b { color: var(--blue); }
.ai-cmp-on { border: 2px solid var(--blue); }
.ai-cmp p { margin-top: 6px; color: var(--ink); font-weight: 500; }
.ai-cmp-e { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .875rem; font-weight: 700; }
.ai-cmp-on .ai-cmp-e { background: var(--blue-pale); color: var(--blue); }
/* custom: ideas */
.ai-ideas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-idea { padding: 22px; border-radius: var(--r); background: #fff; }
.ai-idea-tag { color: var(--blue); font-size: .75rem; font-weight: 700; letter-spacing: .06em; }
.ai-idea h3 { margin-top: 8px; font-size: 1.0625rem; }
.ai-idea p { margin-top: 6px; color: var(--muted); }

/* tabs (server-rendered; ai-iot.js hides the other panels) */
.ai-tablist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ai-tablist [role="tab"] { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; min-width: 0; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: var(--r); background: #fff; color: var(--ink); font: 700 1rem/1.4 var(--font); text-align: left; cursor: pointer; }
.ai-tablist [role="tab"][aria-selected="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.ai-tablist [role="tab"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ai-tabs:not(.is-js) .ai-tablist { display: none; }
.ai-tabs:not(.is-js) .ai-tabpanel + .ai-tabpanel { margin-top: 20px; }
.ai-tabpanel:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.ai-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-case { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ai-case h3 { font-size: 1.0625rem; }
.ai-case > p { color: var(--muted); }
/* before -> after is the point of the card (review 2026-11-05, second pass): a grey Before box, a triangle pointing
   down, a blue After box. Both boxes hold two lines, so the three cards of a row line up. */
.ai-case .ai-ba { display: grid; gap: 30px; margin-top: auto; padding-top: 10px; }
.ai-b, .ai-a { display: grid; grid-template-columns: 4.25em minmax(0, 1fr); gap: 10px; align-items: center; min-height: 68px; padding: 10px 14px; border-radius: var(--r); line-height: 1.45; }
.ai-ba b { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.ai-b { background: var(--soft); color: var(--muted); }
.ai-a { position: relative; background: var(--blue); color: #fff; font-weight: 700; }
.ai-a::before { content: ""; position: absolute; top: -21px; left: 50%; margin-left: -10px; border-style: solid; border-width: 12px 10px 0 10px; border-color: var(--blue) transparent transparent transparent; }
.ai-a b { color: #fff; opacity: .85; }
html:lang(th) .ai-ba b { letter-spacing: 0; }

/* what you get */
.ai-feat-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; }
.ai-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-feats li { display: flex; gap: 14px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-weight: 500; }
.ai-feats .ico { flex: 0 0 36px; width: 36px; height: 36px; color: var(--blue); stroke-width: 1.5; }
.ai-who { padding: 22px 24px; border-radius: var(--r); background: var(--soft); }
.ai-who h3 { color: var(--blue); font-size: 1rem; }
.ai-who p { margin-top: 6px; color: var(--ink); }

/* in practice (client photos) */
.ai-gals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.ai-gal { margin: 0; }
.ai-gal.wide { grid-column: 1 / -1; }
.ai-gal img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.ai-gal.wide img { aspect-ratio: 16 / 9; }
.ai-gal figcaption { margin-top: 12px; color: var(--text); font-size: 1rem; line-height: 1.6; }

/* FAQ, the same on every page (review 2026-11-04 for IT / Security, all pages 2026-11-05): one list in a single panel,
   rows divided by lines, a Q marker, the question and its chevron on one baseline, the answer indented under the question */
.ai-faqs { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.soft .ai-faqs { border-color: transparent; }
.ai-faq + .ai-faq { border-top: 1px solid var(--line); }
.ai-faq summary { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; column-gap: 14px; align-items: start; padding: 18px 20px; color: var(--ink); font-size: 1.0625rem; font-weight: 700; line-height: 1.45; cursor: pointer; list-style: none; }
.ai-faq summary::-webkit-details-marker { display: none; }
.ai-faq summary::before { content: "Q"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .875rem/1 var(--fx-font); }
.ai-faq summary .ico { display: grid; place-items: center; box-sizing: content-box; flex: none; width: 16px; height: 16px; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); background: #fff; transition: transform .3s var(--fx-ease); }
.ai-faq[open] summary { background: var(--blue-pale); }
.ai-faq[open] summary .ico { background: var(--blue); border-color: var(--blue); color: #fff; transform: rotate(180deg); }
.ai-faq summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.ai-page .ai-faq p { padding: 16px 20px 20px 62px; color: var(--text); }

/* service cards (related): border + arrow at rest, hover only deepens them */
.ai-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.ai-card h3 { font-size: 1.125rem; }
.ai-card-prod { overflow: hidden; color: var(--blue); font-size: .875rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.ai-card-lead { color: var(--muted); }
.ai-card-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; color: var(--blue); font-weight: 700; }
.ai-card-go .ico { width: 16px; height: 16px; transition: transform .25s var(--fx-ease); }
.ai-card:hover, .ai-card:focus-visible { border-color: var(--blue); box-shadow: 0 6px 18px -12px rgba(22, 109, 255, .6); color: var(--ink); }
.ai-card:hover .ai-card-go .ico { transform: translateX(3px); }
.ai-back { margin-top: 20px; font-weight: 700; }

/* start small: the 5 steps */
.ai-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: f; }
.ai-flow li { display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; border-top: 3px solid var(--blue); background: var(--blue-pale); counter-increment: f; }
.ai-flow li::before { content: "0" counter(f); margin-bottom: 4px; color: var(--blue); font: 700 1.375rem/1 var(--fx-font); letter-spacing: -.02em; }
.ai-flow strong { color: var(--ink); line-height: 1.4; }
.ai-flow span { color: var(--muted); font-size: .9375rem; line-height: 1.55; }

/* ---------- overview: problem cards with the real product photo on the left (first row fits a 1366x768 screen) ---------- */
.ai-problems-sec { padding-top: 28px; }
.ai-problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ai-problems .is-wide { grid-column: 1 / -1; }
.ai-prob { position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr); height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); transition: border-color .2s, box-shadow .2s; }
/* the photo fills its column whatever the card's height (absolute: a % height does not resolve in an auto-height row) */
.ai-prob-img { position: relative; display: block; min-height: 100%; overflow: hidden; background: var(--soft); }
.ai-prob-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--fx-ease); }
.ai-prob-copy { display: flex; flex-direction: column; gap: 3px; padding: 14px 44px 14px 16px; }
.ai-prob strong { min-height: 2.7em; font-size: 1.0625rem; line-height: 1.35; }
.ai-prob-a { color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.ai-prob-svc { margin-top: auto; padding-top: 6px; color: var(--blue); font-size: .8125rem; font-weight: 700; }
.ai-prob > .ico { position: absolute; right: 14px; bottom: 14px; width: 22px; height: 22px; color: var(--blue); transition: transform .25s var(--fx-ease); }
.ai-prob:hover, .ai-prob:focus-visible { border-color: var(--blue); box-shadow: 0 10px 24px -16px rgba(22, 109, 255, .7); color: var(--ink); }
.ai-prob:hover > .ico { transform: translateX(3px); }
.ai-prob:hover img { transform: scale(1.04); }
/* "a problem no product solves" is not one more product card (review 2026-11-05): full width, solid blue, white type,
   and the service name as a white button, so it reads as the way out when nothing above fits */
.ai-prob-custom { grid-template-columns: 300px minmax(0, 1fr); border-color: var(--blue); background: var(--blue); color: #fff; }
.ai-prob-custom .ai-prob-copy { justify-content: center; gap: 6px; padding: 28px 72px 28px 32px; }
.ai-prob-custom strong { min-height: 0; font: 700 clamp(1.375rem, 1.1rem + .9vw, 1.75rem)/1.25 var(--fx-font); }
.ai-prob-custom .ai-prob-a { color: rgba(255, 255, 255, .88); font-size: 1.0625rem; }
.ai-prob-custom .ai-prob-svc { align-self: flex-start; margin-top: 12px; padding: 8px 16px; border-radius: var(--r-sm); background: #fff; color: var(--blue); font-size: .9375rem; }
.ai-prob-custom > .ico { right: 28px; bottom: calc(50% - 14px); width: 28px; height: 28px; color: #fff; }
.ai-prob-custom:hover, .ai-prob-custom:focus-visible { border-color: var(--blue-deep); background: var(--blue-deep); box-shadow: none; color: #fff; }
/* office section: the button under the use cases */
.ai-office-go { margin-top: 24px; }
.ai-office-go .e-btn { width: auto; min-height: 46px; }
/* office / factory panels */
.ai-panels { display: grid; gap: 20px; }
.ai-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ai-panel-img { min-height: 100%; overflow: hidden; }
.ai-panel-img img { width: 100%; height: 100%; object-fit: cover; }
.ai-panel-body { padding: 28px 32px; }
.ai-panel h3 { font-size: 1.5rem; }
.ai-panel-body > p { margin-top: 6px; color: var(--muted); }
.ai-panel-list { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ai-panel-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ai-panel-list strong { font-size: 1.0625rem; }
.ai-panel-list span { grid-column: 1; color: var(--blue); font-size: .875rem; font-weight: 700; }
.ai-panel-list .ico { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 20px; height: 20px; color: var(--blue); transition: transform .25s var(--fx-ease); }
.ai-panel-list a:hover .ico { transform: translateX(3px); }
.ai-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ai-why li { padding: 24px; border-radius: var(--r); background: #fff; }
.ai-sec:not(.soft) .ai-why li { border: 1px solid var(--line); }
.ai-why h3 { font-size: 1.125rem; }
.ai-why p { margin-top: 6px; color: var(--muted); }

/* ---------- overview: one day in a Thai factory (the client's 7 scenes on a clock) ---------- */
.ai-tour { --n: 7; --at: 0; padding: clamp(16px, 2.4vw, 28px); border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ai-tour-steps { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; padding: 0 0 18px; list-style: none; }
.ai-tour-steps::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; background: var(--soft); }
.ai-tour-steps::after { content: ""; position: absolute; left: 0; bottom: 6px; width: calc((var(--at) + 1) / var(--n) * 100%); height: 3px; background: var(--blue); transition: width .45s var(--fx-ease); }
.ai-tour-steps button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: 100%; min-width: 0; min-height: 60px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font: 700 .9375rem/1.3 var(--font); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.ai-tour-steps button b { color: var(--blue); font: 700 1.125rem/1 var(--fx-font); }
.ai-tour-steps button.is-done { border-color: #B9D2FF; background: var(--blue-pale); }
.ai-tour-steps button[aria-selected="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.ai-tour-steps button[aria-selected="true"] b { color: #fff; }
.ai-tour-steps button:focus-visible, .ai-tour-nav button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ai-tour:not(.is-js) .ai-tour-steps, .ai-tour:not(.is-js) .ai-tour-nav { display: none; }
.ai-tour:not(.is-js) .ai-tour-panel + .ai-tour-panel { margin-top: 32px; }
.ai-tour-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.ai-tour-copy { padding-top: 8px; }
.ai-tour-panel[hidden] { display: none; }
.ai-tour-panel:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 8px; }
.ai-tour-time { color: var(--blue); font: 700 2rem/1 var(--fx-font); }
.ai-tour-q { margin-top: 10px; color: var(--ink); font-size: clamp(1.25rem, 1rem + .9vw, 1.75rem); line-height: 1.35; }
.ai-tour-t { margin-top: 8px; color: var(--muted); }
.ai-tour-does { margin-top: 18px; color: var(--blue); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ai-tour-does + p { margin-top: 4px; color: var(--ink); }
.ai-tour-go { width: auto; min-height: 46px; margin-top: 18px; }
.ai-tour-panel .ai-demo { margin: 0; }
.ai-tour-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.ai-tour-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font: 700 1rem/1 var(--font); cursor: pointer; }
.ai-tour-nav button.next { border-color: var(--blue); background: var(--blue); color: #fff; }
.ai-tour-nav button[aria-disabled="true"] { opacity: .4; cursor: default; }
.ai-tour-nav .ico { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .ai-problems, .ai-tools, .ai-roles, .ai-ideas, .ai-mats, .ai-conn, .ai-grid-4, .ai-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-tour-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ai-shield { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .v-f .ai-hero { grid-template-columns: minmax(0, 1fr); }
  .ai-split, .ai-feat-grid, .ai-tour-panel, .ai-how.has-demo, .ai-ppe-wrap, .ai-flow-row, .ai-panel, .ai-pains, .ai-feats { grid-template-columns: minmax(0, 1fr); }
  .ai-panel-img { aspect-ratio: 16 / 7; min-height: 0; }
  .ai-prob-custom { grid-template-columns: 128px minmax(0, 1fr); }
  .ai-prob-custom .ai-prob-copy { padding: 20px 20px 20px 18px; }
  .ai-prob-custom > .ico { display: none; }
  .ai-stat { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ai-stat-k { padding: 20px 20px 18px; }
  .ai-stat-items { grid-template-columns: minmax(0, 1fr); }
  .ai-stat-items li, .ai-stat.is-list .ai-stat-items li { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 20px; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .28); }
  .ai-stat.is-list .ai-stat-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-stat.is-list .ai-stat-items li { align-items: baseline; gap: 10px; padding: 14px 12px 14px 20px; }
  .ai-stat.is-list .ai-stat-items li:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .28); padding-left: 14px; }
  .ai-stat-ico { width: 38px; height: 38px; }
  .ai-stat b { white-space: normal; }
  .ai-page .ai-stat > span { padding: 12px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .45); }
  .ai-how:not(.has-demo) .ai-steps, .ai-cases, .ai-why, .ai-gals, .ai-panels, .ai-stages, .ai-stories, .ai-phases, .ai-compare, .ai-tl { grid-template-columns: minmax(0, 1fr); }
  .ai-tl li, .ai-tl li + li { padding-left: 0; border-top: 0; border-left: 3px solid var(--blue); padding: 4px 0 20px 20px; }
  .ai-tl li::before, .ai-tl li + li::before { top: 6px; left: -8px; }
  .ai-brand .wrap, .ai-brand.no-tile .wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ai-brand-tile { justify-self: start; min-width: 0; }
  .ai-brand-who { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .ai-prob { grid-template-columns: 104px minmax(0, 1fr); }
  .ai-problems, .ai-flow, .ai-tools, .ai-roles, .ai-ideas, .ai-mats, .ai-conn, .ai-grid-4, .ai-shield, .ai-ppe, .ai-cards { grid-template-columns: minmax(0, 1fr); }
  .ai-tour-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-tour-steps::before, .ai-tour-steps::after { display: none; }
  .ai-hero-cta .e-btn, .ai-tour-go, .ai-office-go .e-btn { width: 100%; }
  .ai-prob-custom { grid-template-columns: 104px minmax(0, 1fr); }
  .ai-pains li { gap: 12px; padding: 14px; }
  .ai-pain-ico { width: 34px; height: 34px; }
  .ai-feats li { padding: 14px; }
  .ai-feats .ico { flex-basis: 30px; width: 30px; height: 30px; }
  .ai-shield li { padding: 16px; }
  .ai-shield .ai-duo { width: 44px; height: 44px; }
  .ai-gals { gap: 24px; }
  .ai-faq summary { grid-template-columns: 24px minmax(0, 1fr) 24px; column-gap: 10px; padding: 14px 14px; font-size: 1rem; }
  .ai-faq summary::before { width: 24px; height: 24px; margin-top: 1px; font-size: .75rem; }
  .ai-faq summary .ico { width: 14px; height: 14px; padding: 4px; margin-top: 1px; }
  .ai-page .ai-faq p { padding: 12px 14px 16px 48px; }
  .ai-stage { padding: 24px; }
  .ai-stage-no { position: static; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-card, .ai-prob, .ai-prob img, .ai-card-go .ico, .ai-prob > .ico, .ai-faq summary .ico, .ai-tour-steps::after, .ai-panel-list .ico { transition: none; }
}

/* roomier rhythm on tablets and desktops (review 2026-11-05: next to digital-marketing.html the other service pages felt
   tight): more air between sections, under each section heading, between cards and inside them. Used by every .ai-page
   (AI & IoT, IT, Security and the digital marketing detail pages). Phones keep the tighter spacing of the 2026-11-04 review. */
@media (min-width: 721px) {
  .ai-page .ai-sec { padding: clamp(60px, 7vw, 104px) 0; }
  .ai-page .ai-problems-sec, .ai-page .its-probs-sec { padding-top: clamp(40px, 4.4vw, 60px); }      /* first section, right under the hero */
  .ai-page .ai-head { margin-bottom: clamp(30px, 3.4vw, 48px); }
  .ai-page .ai-lead { margin-top: 14px; }
  .ai-page .ai-pains, .ai-page .ai-items, .ai-page .ai-tools, .ai-page .ai-stages, .ai-page .ai-roles, .ai-page .ai-mats, .ai-page .ai-compare,
  .ai-page .ai-ideas, .ai-page .ai-cases, .ai-page .ai-feats, .ai-page .ai-cards, .ai-page .ai-problems, .ai-page .ai-why, .ai-page .ai-panels,
  .ai-page .ai-how:not(.has-demo) .ai-steps, .ai-page .its-verify, .ai-page .its-probs, .ai-page .dmx-features, .ai-page .ai-stories, .ai-page .ai-phases { gap: 24px; }
  .ai-page .ai-shield, .ai-page .ai-conn, .ai-page .its-features, .ai-page .ai-how.has-demo .ai-steps { gap: 20px; }
  .ai-page .ai-ppe, .ai-page .ai-flow { gap: 16px; }
  .ai-page .ai-how.has-demo { gap: clamp(24px, 3.4vw, 48px); }
  .ai-page .ai-pains li, .ai-page .ai-feats li, .ai-page .ai-steps li, .ai-page .ai-items li, .ai-page .ai-shield li { padding: 24px; }
  .ai-page .ai-case, .ai-page .ai-card, .ai-page .ai-roles li, .ai-page .ai-mats li, .ai-page .ai-idea { padding: 26px; }
  .ai-page .ai-conn li { padding: 20px 22px; }
  .ai-page .ai-flow li { padding: 22px 18px; }
  .ai-page .ai-stat { margin-top: 32px; }
  .ai-page .ai-tablist { margin-bottom: 24px; }
  .ai-page .ai-conn { margin-bottom: 32px; }
  .ai-page .ai-back { margin-top: 32px; }
}
