/* Dunlaya Accounting & Tax — concept demo stylesheet
   Palette: cool ledger paper, ledger green, red-pencil red for deadlines.
   Type: IBM Plex Sans Thai (headings, figures, UI) + Sarabun (body). */

:root {
  --paper: #F2F5F3;
  --surface: #FFFFFF;
  --mint: #E2EDE7;
  --rule: #CADBD2;
  --rule-strong: #93B5A6;
  --ink: #17302A;
  --ink-soft: #4A625B;
  --ledger: #22604F;
  --ledger-deep: #184838;
  --red: #B42318;
  --line-green: #06C755;
  --focus: #B42318;

  --f-head: "IBM Plex Sans Thai", "Sarabun", system-ui, sans-serif;
  --f-body: "Sarabun", "IBM Plex Sans Thai", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;
  --radius: 6px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  body { font-size: 1.125rem; }
}

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

h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.125rem, 1.35rem + 3.3vw, 3.5rem); line-height: 1.32; }
h2 { font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--ledger); text-underline-offset: 0.22em; }
a:hover { color: var(--ledger-deep); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--f-head);
  border-radius: var(--radius);
}
.skip:focus { top: 12px; color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.num {
  font-family: var(--f-head);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.5em 1.25em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--ledger); color: #fff; }
.btn-primary:hover { background: var(--ledger-deep); color: #fff; }

.btn-outline { background: transparent; color: var(--ledger); border-color: var(--ledger); }
.btn-outline:hover { background: var(--mint); color: var(--ledger-deep); }

.btn-sm { min-height: 44px; padding: 0.35em 1em; font-size: 0.9375rem; }

.icon-line { color: var(--line-green); }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 72px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark rect { fill: var(--ledger); }
.brand-mark path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: square; }

.brand-name {
  display: block;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
}
.brand-sub {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

@media (max-width: 419px) {
  .header-inner { gap: 4px 8px; }
  .site-header .brand-sub { display: none; }
  .menu-toggle { padding: 0; justify-content: center; }
  .menu-label {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.site-nav { order: 10; flex-basis: 100%; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 6px 0 10px;
  border-top: 1px solid var(--rule);
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ledger); }
.site-nav a[aria-current="page"] {
  color: var(--ledger);
  text-decoration: underline double;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
}

.lang {
  display: flex;
  align-items: center;
  margin: 0;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
}
.lang a,
.lang .is-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.lang .is-current {
  color: var(--ink);
  text-decoration: underline double;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}
.lang a { color: var(--ink-soft); text-decoration: none; }
.lang a:hover { color: var(--ledger); }
.lang .sep { color: var(--rule-strong); }

.header-cta { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
}
.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
}
.menu-toggle .bars { position: relative; }
.menu-toggle .bars::before { position: absolute; top: -6px; }
.menu-toggle .bars::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

html:not(.js) .menu-toggle { display: none; }

@media (min-width: 768px) {
  .header-cta { display: inline-flex; }
}

@media (min-width: 1024px) {
  .header-inner { flex-wrap: nowrap; gap: 8px 20px; min-height: 80px; }
  .site-nav, .js .site-nav { display: block; order: 0; flex-basis: auto; }
  .site-nav ul { display: flex; gap: 2px; padding: 0; border: 0; }
  .site-nav a { padding: 0 10px; }
  .menu-toggle { display: none; }
}

/* Concept badge */
.concept-row { border-bottom: 1px solid var(--rule); }
.concept {
  display: inline-block;
  margin: 8px 0;
  padding: 1px 12px;
  border: 1px dashed var(--rule-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--f-head);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section-white { background: var(--surface); border-block: 1px solid var(--rule); }

@media (min-width: 768px) {
  .section { padding: 88px 0; }
}

.sec-head { max-width: 40rem; margin-bottom: 32px; }
.sec-head p { color: var(--ink-soft); margin: 0; }

.split { display: grid; gap: 28px; }

@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
  .split > .sec-head { position: sticky; top: 24px; align-self: start; margin: 0; }
}

.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  font-family: var(--f-head);
  font-weight: 500;
}

/* ---------- Hero ---------- */

.hero { padding: 36px 0 56px; }

.hero-grid { display: grid; gap: 44px; }

.hero h1 { max-width: 13em; }

.hero .lead {
  max-width: 34em;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 28px;
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule-strong);
  display: grid;
  gap: 6px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .hero { padding: 72px 0 96px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 72px;
    align-items: start;
  }
  .hero .lead { font-size: 1.25rem; }
}

/* Tick used in lists */
.checks { list-style: none; margin: 0 0 20px; padding: 0; }
.checks li,
.hero-points li {
  position: relative;
  padding-left: 30px;
}
.checks li { margin-bottom: 8px; }
.checks li::before,
.hero-points li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--ledger);
  border-bottom: 2px solid var(--ledger);
  transform: rotate(-45deg);
}

/* ---------- Tax calendar slip (hero) ---------- */

.taxslip {
  position: relative;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}
.taxslip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--mint);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  transform: rotate(-2deg) translate(-6px, 8px);
}

@media (min-width: 768px) {
  .taxslip { padding: 26px 28px 22px; }
}

.taxslip-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 16px;
  padding-bottom: 10px;
  border-bottom: 4px double var(--ink);
}
.taxslip-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.taxslip-month {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.375rem;
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin: 14px 0 16px;
  text-align: center;
  font-family: var(--f-head);
  font-variant-numeric: tabular-nums;
}
.cal:empty { display: none; }
.cal .dow {
  padding: 2px 0 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.cal .day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-height: 46px;
  font-size: 0.9375rem;
  line-height: 1;
}
.cal .day.is-off { color: var(--ink-soft); }
.cal .day.is-holiday { color: var(--red); }
.cal .day.is-today {
  background: var(--ledger);
  color: #fff;
  border-radius: 4px;
}
.cal .ring {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  overflow: visible;
  pointer-events: none;
}
.cal .ring path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.7s ease-out forwards;
}
.cal .is-done .ring path { stroke: var(--rule-strong); }

@keyframes draw { to { stroke-dashoffset: 0; } }

.slip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.slip-list li {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.slip-list .when {
  font-family: var(--f-head);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.slip-list .moved {
  display: block;
  color: var(--red);
  font-size: 0.875rem;
}
.slip-list .is-done { color: var(--ink-soft); }
.slip-list .is-done .when { text-decoration: line-through; text-decoration-color: var(--rule-strong); }

.slip-next {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--mint);
  border-left: 3px solid var(--red);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
}
.slip-next strong { display: block; color: var(--red); font-size: 1.125rem; }

.slip-annual {
  margin: 12px 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.slip-note {
  margin: 12px 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Photo band ---------- */

.photo-band img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mint);
}
@media (min-width: 768px) {
  .photo-band img { aspect-ratio: 21 / 8; }
}

/* ---------- T-accounts (who we serve) ---------- */

.tacc-list { display: grid; gap: 40px; }

.tacc-title {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  text-align: center;
  font-size: 1.25rem;
}
.tacc-title small {
  display: block;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.tacc-cols { display: grid; }
.tacc-col { padding: 14px 0 6px; }
.tacc-col + .tacc-col { border-top: 1px dashed var(--rule-strong); }

.tacc h4 {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.tacc ul { margin: 0; padding-left: 1.15em; }
.tacc li { margin-bottom: 6px; }
.tacc li::marker { color: var(--rule-strong); }

@media (min-width: 640px) {
  .tacc-cols { grid-template-columns: 1fr 1fr; }
  .tacc-col { padding: 16px 24px 6px 0; }
  .tacc-col + .tacc-col {
    padding: 16px 0 6px 24px;
    border-top: 0;
    border-left: 2px solid var(--ink);
  }
}

/* ---------- Service rows (home) ---------- */

.svc-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.svc-rows li { border-bottom: 1px solid var(--rule); }
.svc-rows a {
  display: grid;
  gap: 2px;
  padding: 18px 0;
  color: inherit;
  text-decoration: none;
}
.svc-rows h3 { margin: 0; font-size: 1.1875rem; }
.svc-rows p { margin: 0; color: var(--ink-soft); }
.svc-rows .price {
  font-family: var(--f-head);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ledger);
}
.svc-rows a:hover h3 { color: var(--ledger); text-decoration: underline; text-underline-offset: 0.22em; }

@media (min-width: 768px) {
  .svc-rows a {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 32px;
    align-items: baseline;
  }
  .svc-rows .price { grid-column: 2; grid-row: 1 / span 2; text-align: right; white-space: nowrap; }
}

/* ---------- Why us ---------- */

.points { margin: 0; }
.points div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.points div:first-child { border-top: 2px solid var(--ink); }
.points dt { font-family: var(--f-head); font-weight: 700; font-size: 1.125rem; }
.points dd { margin: 2px 0 0; color: var(--ink-soft); }

.why-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .why-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
}

.statement {
  margin: 0 0 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}
.statement table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.statement caption {
  caption-side: top;
  padding-bottom: 10px;
  text-align: left;
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.5;
}
.statement th,
.statement td {
  padding: 9px 0;
  border-bottom: 1px dotted var(--rule-strong);
  text-align: left;
  font-weight: 400;
}
.statement td { text-align: right; font-family: var(--f-head); font-variant-numeric: tabular-nums; }
.statement tfoot th,
.statement tfoot td { border-bottom: 0; font-weight: 700; padding-top: 12px; }
.statement tfoot td span { border-bottom: 4px double var(--ink); padding-bottom: 1px; }

.figure { margin: 0; }
.figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  background: var(--mint);
}
.figure figcaption {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Process steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.steps li { position: relative; padding-left: 64px; }
.steps li::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: -24px;
  width: 2px;
  background: var(--rule-strong);
}
.steps li:last-child::before { display: none; }
.steps .n {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ledger);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ledger);
  font-family: var(--f-head);
  font-weight: 700;
}
.steps h3 { margin: 6px 0 4px; font-size: 1.125rem; }
.steps p { margin: 0; color: var(--ink-soft); }

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .steps li { padding: 64px 0 0; }
  .steps li::before { left: 56px; right: -24px; top: 21px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Testimonials ---------- */

.quotes { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}
.quote {
  margin: 0;
  padding: 2px 0 0 20px;
  border-left: 3px solid var(--ledger);
}
.quote .stars { margin: 0 0 6px; color: var(--ledger); letter-spacing: 0.1em; }
.quote blockquote { margin: 0 0 14px; }
.quote blockquote p { margin: 0; }
.quote figcaption { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.quote figcaption strong { display: block; color: var(--ink); font-family: var(--f-head); font-weight: 500; }

/* ---------- CTA band ---------- */

.cta-band {
  --focus: #FFFFFF;
  padding: 56px 0;
  background: var(--ledger);
  color: #fff;
}
.cta-band h2 { color: #fff; max-width: 22em; }
.cta-band p { max-width: 36rem; color: #E6F0EB; }
.cta-band .btn-primary { background: #fff; color: var(--ledger-deep); }
.cta-band .btn-primary:hover { background: var(--mint); color: var(--ledger-deep); }
.cta-band .btn-outline { color: #fff; border-color: #fff; }
.cta-band .btn-outline:hover { background: var(--ledger-deep); color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (min-width: 768px) {
  .cta-band { padding: 72px 0; }
}

/* ---------- Page head (inner pages) ---------- */

.page-head {
  padding: 40px 0 32px;
  border-bottom: 4px double var(--ink);
}
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.page-head .lead { max-width: 38rem; margin: 0; font-size: 1.125rem; color: var(--ink-soft); }

@media (min-width: 768px) {
  .page-head { padding: 64px 0 48px; }
  .page-head .lead { font-size: 1.1875rem; }
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.jump a:hover { border-color: var(--ledger); color: var(--ledger); }

.banner { margin: 32px 0 0; }
.banner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--mint);
}
@media (min-width: 768px) {
  .banner { margin: 32px 0 0; }
.banner img { aspect-ratio: 3 / 1; }
}

/* ---------- Month cycle (services) ---------- */

.ruler { display: none; }

.month { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.month li {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.month .d {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ledger);
}
.month strong { display: block; font-family: var(--f-head); font-weight: 500; }
.month span.sub { color: var(--ink-soft); font-size: 1rem; }

@media (min-width: 900px) {
  .ruler {
    display: grid;
    grid-template-columns: repeat(31, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 0;
    font-family: var(--f-head);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--ink-soft);
  }
  .ruler span {
    padding: 6px 0;
    border-top: 6px solid var(--rule);
    line-height: 1.4;
  }
  .ruler .r-docs { border-top-color: var(--rule-strong); }
  .ruler .r-act { border-top-color: var(--ledger); color: var(--ledger); font-weight: 700; }
  .ruler .r-due { border-top-color: var(--red); color: var(--red); font-weight: 700; }
  .month {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    border-top: 0;
  }
  .month li { display: block; padding: 12px 0 0; border-bottom: 0; border-top: 2px solid var(--ink); }
  .month .d { display: block; margin-bottom: 4px; }
  .ruler-legend { display: flex; }
}

.ruler-legend {
  display: none;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.ruler-legend li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 6px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--rule-strong);
}
.ruler-legend .l-act::before { background: var(--ledger); }
.ruler-legend .l-due::before { background: var(--red); }

/* ---------- Service detail ---------- */

.svc {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 12px;
}
.svc:last-of-type { border-bottom: 0; }
.svc-grid { display: grid; gap: 20px; }
.svc-aside h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.svc-aside .for { color: var(--ink-soft); margin: 0 0 16px; }
.svc-body > p:first-child { margin-top: 0; }
.svc-body h3 { font-size: 1.0625rem; margin: 24px 0 10px; }
.svc-body h3:first-child { margin-top: 0; }

@media (min-width: 1024px) {
  .svc { padding: 72px 0; }
  .svc-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
  .svc-aside { position: sticky; top: 24px; align-self: start; }
}

.price-tag {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.price-tag .from { display: block; font-size: 0.9375rem; color: var(--ink-soft); }
.price-tag strong {
  font-size: 1.875rem;
  font-weight: 700;
  border-bottom: 4px double var(--ink);
}
.price-tag .unit { font-size: 1rem; color: var(--ink-soft); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.6;
}
.data-table caption {
  caption-side: top;
  padding-bottom: 8px;
  text-align: left;
  font-family: var(--f-head);
  font-weight: 700;
}
.data-table th,
.data-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.data-table th:last-child,
.data-table td:last-child { padding-right: 0; }
.data-table thead th {
  border-bottom: 2px solid var(--ink);
  color: var(--ink-soft);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
}
.data-table tbody th { font-family: var(--f-head); font-weight: 500; white-space: nowrap; }
.data-table .r { text-align: right; font-family: var(--f-head); font-variant-numeric: tabular-nums; }
.data-table .nowrap { white-space: nowrap; }

.note {
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--mint);
  border-left: 3px solid var(--rule-strong);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.steps-plain { margin: 0 0 20px; padding-left: 1.4em; }
.steps-plain li { margin-bottom: 8px; padding-left: 4px; }
.steps-plain li::marker { font-family: var(--f-head); font-weight: 700; color: var(--ledger); }

/* ---------- Pricing ---------- */

.plans { display: grid; gap: 20px; }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
}
.plan.is-featured { border: 2px solid var(--ledger); }
.plan-flag {
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 0 10px;
  background: var(--ledger);
  color: #fff;
  border-radius: 999px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.8;
}
.plan h3 { margin: 0; font-size: 1.375rem; }
.plan .for { margin: 2px 0 16px; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.plan .price-tag strong { font-size: 2.25rem; }
.plan .docs {
  margin: 16px 0;
  padding: 8px 0;
  border-block: 1px solid var(--rule);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 1rem;
}
.plan .checks { flex: 1; font-size: 1rem; }
.plan .btn { width: 100%; }

.vat-note { margin: 20px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  font-size: 1rem;
  line-height: 1.6;
}
.compare caption {
  caption-side: top;
  padding-bottom: 12px;
  text-align: left;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.compare th,
.compare td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  vertical-align: middle;
}
.compare thead th {
  background: var(--mint);
  border-bottom: 2px solid var(--ink);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 0.9375rem;
}
.compare tbody th { text-align: left; font-weight: 400; }
.compare .yes { color: var(--ledger); font-weight: 700; font-size: 1.125rem; }
.compare .no { color: var(--ink-soft); }
.compare thead td { background: var(--mint); border-bottom: 2px solid var(--ink); }
.compare .total th { font-family: var(--f-head); font-weight: 700; }
.compare .total td { font-family: var(--f-head); font-weight: 700; font-variant-numeric: tabular-nums; }
.compare .total td span { border-bottom: 4px double var(--ink); }

@media (max-width: 699px) {
  .compare,
  .compare thead,
  .compare tbody { display: block; }
  .compare thead { position: sticky; top: 0; z-index: 2; }
  .compare caption { display: block; padding: 12px 10px; }
  .compare tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .compare thead td { display: none; }
  .compare thead th { padding: 8px 4px; font-size: 0.8125rem; line-height: 1.5; }
  .compare tbody th {
    grid-column: 1 / -1;
    padding: 10px 10px 0;
    border-bottom: 0;
    background: transparent;
    font-family: var(--f-head);
    font-weight: 500;
  }
  .compare td { padding: 4px 4px 10px; font-size: 0.9375rem; }
}

/* ---------- FAQ ---------- */

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-family: var(--f-head);
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ledger);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { max-width: 42rem; margin: 0 0 18px; color: var(--ink-soft); }

/* ---------- About ---------- */

.facts { display: grid; gap: 0; margin: 0; border-top: 2px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule-strong);
}
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-family: var(--f-head); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.team {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }

.person { padding-top: 18px; border-top: 2px solid var(--ink); }
.monogram {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border: 2px solid var(--ledger);
  border-radius: 50%;
  background: var(--mint);
  color: var(--ledger);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
}
.person h3 { margin: 0; font-size: 1.1875rem; }
.person .role { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.person .licence {
  margin: 10px 0;
  padding: 6px 0;
  border-block: 1px dashed var(--rule-strong);
  font-family: var(--f-head);
  font-size: 0.875rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.person p:last-child { margin: 0; font-size: 1rem; }

.values { display: grid; gap: 0; margin: 0; }
@media (min-width: 768px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.values div { padding: 18px 0; border-top: 1px solid var(--rule); }
.values dt { font-family: var(--f-head); font-weight: 700; font-size: 1.125rem; }
.values dd { margin: 4px 0 0; color: var(--ink-soft); }

.about-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
}

.form-card {
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
}
@media (min-width: 768px) { .form-card { padding: 32px; } }

.form-card h2 { font-size: 1.5rem; }

.field { margin: 0 0 22px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field > label,
.field > legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-family: var(--f-head);
  font-weight: 500;
  line-height: 1.5;
}
.req { color: var(--red); }
.optional { font-weight: 400; font-size: 0.9375rem; color: var(--ink-soft); }
.hint { margin: 4px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

input[type="text"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317302A' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
textarea { min-height: 120px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ledger); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ledger); }
[aria-invalid="true"] { border-color: var(--red) !important; }

.field-error {
  margin: 6px 0 0;
  color: var(--red);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--f-head);
  font-size: 0.9375rem;
  cursor: pointer;
}
.choice input:hover + span { border-color: var(--ledger); }
.choice input:checked + span { background: var(--ledger); border-color: var(--ledger); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset[aria-invalid="true"] .choice span { border-color: var(--red); }

.demo-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--ink-soft); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  font-size: 1rem;
  line-height: 1.6;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  accent-color: var(--ledger);
}

.form-actions { margin-top: 8px; }
.form-actions .btn { width: 100%; }
@media (min-width: 768px) { .form-actions .btn { width: auto; } }

.thanks h2 { color: var(--ledger); }
.thanks:focus { outline: none; }
.thanks .checks { margin-top: 8px; }

.info { margin: 0; }
.info div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.info div:first-child { border-top: 2px solid var(--ink); }
.info dt { font-family: var(--f-head); font-weight: 500; color: var(--ink-soft); font-size: 0.9375rem; }
.info dd { margin: 2px 0 0; }
.info dd a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--f-head); font-weight: 500; }
.info .hours { width: 100%; border-collapse: collapse; font-size: 1rem; }
.info .hours th { text-align: left; font-weight: 400; padding: 2px 12px 2px 0; }
.info .hours td { text-align: right; font-family: var(--f-head); font-variant-numeric: tabular-nums; padding: 2px 0; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0 28px;
  background: var(--surface);
  border-top: 4px double var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; } }

.site-footer h2 { margin: 0 0 6px; font-size: 1rem; }
.site-footer p { margin: 0 0 8px; color: var(--ink-soft); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-brand .brand { margin-bottom: 10px; }
.footer-legal {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.footer-legal p { margin: 0; }

/* ---------- PV Dev strip (studio band, separate from demo design) ---------- */

.pvdev {
  --focus: #FFFFFF;
  padding: 6px 0;
  background: #141414;
  color: #D6D6D6;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}
.pvdev p { margin: 0; }
.pvdev a {
  display: inline-block;
  padding: 11px 0;
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pvdev a:hover { color: #FFFFFF; text-decoration-thickness: 2px; }

/* ---------- Mobile action bar ---------- */

.mbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--rule-strong);
}
.mbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 6px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.mbar svg { width: 20px; height: 20px; flex: none; }
.mbar .m-line { background: var(--line-green); color: var(--ink); }
.mbar .m-call { background: #fff; color: var(--ledger); border-color: var(--ledger); }
.mbar .m-main { background: var(--ledger); color: #fff; }

body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
  .mbar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cal .ring path { stroke-dashoffset: 0; animation: none; }
}

.figure-gap { margin-top: 24px; }
