/* ==========================================================================
   DMC Solar — hệ thống giao diện
   Bảng màu:  ink (nền tối)  ·  sun (nhấn)  ·  cell (dữ liệu)  ·  grow (tiết kiệm)
   Chữ:       Inter — một họ duy nhất, giống topcv.vn. Phân vai bằng độ đậm + giãn chữ.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */

:root {
  /* Màu */
  --ink:      #0A1E30;
  --ink-2:    #143049;
  --ink-3:    #1D3F5C;
  --ink-line: rgba(255, 255, 255, .13);

  --sun:      #E8940A;
  --sun-hi:   #FFC24A;
  --cell:     #4FC3D9;
  --grow:     #66B933;

  --paper:    #EDF1F3;
  --paper-2:  #F7F9FA;
  --white:    #FFFFFF;

  --text-on-ink:     #E8EEF3;
  --text-on-ink-dim: #93A8BA;
  --text:            #0A1E30;
  --text-dim:        #52697C;
  --line:            #D3DCE2;

  /* Chữ */
  /* Một họ chữ duy nhất — Inter, như topcv.vn. Inter có đủ dấu tiếng Việt.
     Vẫn giữ ba biến để phân vai: tiêu đề / nội dung / nhãn & số liệu. */
  --display: 'Inter', system-ui, -apple-system, sans-serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'Inter', system-ui, -apple-system, sans-serif;

  /* Nhịp */
  --gut:     clamp(1.25rem, 4vw, 2.5rem);
  --maxw:    1180px;
  --radius:  14px;
  --radius-s: 8px;

  /* Chuyển động */
  --ease: cubic-bezier(.4, .14, .3, 1);
}

/* --- 2. Nền tảng -------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.018em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

figure, dl, dd, pre { margin: 0; }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--sun); color: var(--ink);
  padding: .75rem 1.25rem; z-index: 200; font-weight: 700;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- 3. Bố cục ---------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* Khoảng cách dọc chỉ khai báo ở MỘT nơi để tránh chồng specificity */
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.band--ink { background: var(--ink); color: var(--text-on-ink); }
.band--paper { background: var(--paper); }

.band--ink h1, .band--ink h2, .band--ink h3 { color: var(--white); }

/* --- 4. Nhãn & tiêu đề -------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sun);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.1rem;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .32;
  max-width: 90px;
}
.eyebrow--dim { color: var(--text-dim); }

.h-xl { font-size: clamp(1.95rem, 4.3vw, 3.15rem); }
.h-lg { font-size: clamp(1.65rem, 3.2vw, 2.4rem); }
.h-md { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-dim);
  max-width: 56ch;
  margin-top: 1.15rem;
}
.band--ink .lede { color: var(--text-on-ink-dim); }

/* --- 5. Nút ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.5rem;
  border: 0;
  border-radius: 100px;
  font-family: var(--body);
  font-size: .97rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--call {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 6px 20px -8px rgba(232, 148, 10, .8);
}
.btn--call:hover { background: var(--sun-hi); box-shadow: 0 12px 26px -10px rgba(232, 148, 10, .9); }

.btn--zalo {
  background: var(--grow);
  color: #06240B;
  box-shadow: 0 6px 20px -8px rgba(102, 185, 51, .7);
}
.btn--zalo:hover { background: #7ACC48; }

.btn--ghost {
  background: transparent;
  color: var(--text-on-ink);
  box-shadow: inset 0 0 0 1.5px var(--ink-line);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--outline:hover { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

/* --- 6. Thanh điều hướng ------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 30, 48, .93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-line);
}

.nav__in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

.nav__brand { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.nav__brand img {
  height: 40px; width: auto;
  background: var(--white);
  padding: 5px 10px;
  border-radius: var(--radius-s);
}

.nav__links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  color: var(--text-on-ink-dim);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current='page'] { color: var(--white); border-bottom-color: var(--sun); }

.nav__tel {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .95rem; font-weight: 600;
  color: var(--ink); background: var(--sun);
  padding: .6rem 1.1rem; border-radius: 100px; text-decoration: none;
  transition: background-color .18s var(--ease);
}
.nav__tel:hover { background: var(--sun-hi); }

.nav__toggle {
  display: none;
  background: transparent; border: 1.5px solid var(--ink-line);
  color: var(--white); border-radius: var(--radius-s);
  width: 42px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 980px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--ink-line);
    padding: .5rem var(--gut) 1.25rem;
  }
  .nav__links[hidden] { display: none; }
  .nav__links a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--ink-line); }
  .nav__tel span { display: none; }
}

/* --- 7. Hero ------------------------------------------------------------ */

.hero {
  background:
    radial-gradient(900px 520px at 84% -8%, rgba(232, 148, 10, .2), transparent 62%),
    radial-gradient(700px 480px at 8% 105%, rgba(79, 195, 217, .13), transparent 60%),
    var(--ink);
  color: var(--text-on-ink);
  padding-block: clamp(3rem, 7vw, 5rem) clamp(3.5rem, 8vw, 5.5rem);
  overflow: hidden;
}

/* Trên desktop: chữ bên trái, thang bậc bên phải.
   Trên di động: tiêu đề → thang bậc → phần còn lại, để thứ đáng xem nhất
   không bị đẩy xuống dưới một khối chữ dài. */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas: 'intro ladder' 'support ladder';
  /* Hàng 1 ôm sát tiêu đề, hàng 2 nuốt phần dư khi cột thang bậc cao hơn,
     nhờ vậy phần chữ không bị tách ra thành hai mảng rời nhau */
  grid-template-rows: auto 1fr;
  column-gap: clamp(1.9rem, 4vw, 3.5rem);
  row-gap: clamp(1.4rem, 2.5vw, 2rem);
  align-items: start;
}
.hero__intro   { grid-area: intro; }
.hero__support { grid-area: support; align-self: start; }
.hero .ladder  { grid-area: ladder; align-self: center; }

@media (max-width: 940px) {
  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'intro' 'ladder' 'support';
  }
}

/* Bố cục hai cột dùng lại ở khối liên hệ */
.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 940px) { .split { grid-template-columns: 1fr; } }

.hero h1 { color: var(--white); }

/* Câu chốt dưới tiêu đề — nhấn bằng màu, không bằng cỡ chữ */
.hero__claim {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--sun);
  margin-top: .9rem;
  padding-left: .9rem;
  border-left: 3px solid var(--sun);
}

.hero__note {
  margin-top: 1.8rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--ink-line);
  font-size: .88rem;
  color: var(--text-on-ink-dim);
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
}
.hero__note b { color: var(--cell); font-weight: 600; }

/* --- 8. CHỮ KÝ: Thang bậc giá điện -------------------------------------- */

.ladder {
  background: linear-gradient(168deg, var(--ink-2), #0D2438);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .9);
}

.ladder__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  margin-bottom: 1.4rem;
}
.ladder__title {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; color: var(--text-on-ink-dim);
}
.ladder__bill {
  margin-left: auto;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  color: var(--white); letter-spacing: -.02em;
}
.ladder__bill small {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; color: var(--text-on-ink-dim); margin-left: .35rem;
}

/* Biểu đồ: mỗi cột rộng theo số kWh, cao theo đơn giá → diện tích = tiền */
.ladder__chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 190px;
  margin-bottom: .55rem;
}
@media (max-width: 560px) { .ladder__chart { height: 152px; } }

.tier {
  position: relative;
  border-radius: 5px 5px 0 0;
  background: var(--ink-3);
  overflow: hidden;
  min-width: 4px;
  transition: height .45s var(--ease), flex-grow .45s var(--ease);
}
.tier__fill {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--cell), #2E7F94);
  opacity: .92;
}
/* Phần điện mặt trời bù được — phủ vàng lên các bậc đắt nhất */
.tier__solar {
  position: absolute; inset: 0 0 0 auto;
  width: 0;
  background: linear-gradient(180deg, var(--sun-hi), var(--sun));
  transition: width .5s var(--ease);
}
.tier__cap {
  position: absolute; top: 5px; left: 0; right: 0;
  text-align: center;
  font-family: var(--mono); font-size: .58rem; font-weight: 600;
  color: rgba(255, 255, 255, .85);
  pointer-events: none;
}
@media (max-width: 620px) { .tier__cap { display: none; } }

.ladder__axis {
  display: flex; gap: 3px;
  font-family: var(--mono); font-size: .62rem; font-weight: 500;
  color: var(--text-on-ink-dim);
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--ink-line);
}
.ladder__axis span { text-align: center; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.ladder__axis i { font-style: normal; }
@media (max-width: 620px) { .ladder__axis i { display: none; } }

.ladder__control { padding-top: 1.3rem; }
.ladder__control label {
  display: block; font-size: .84rem; color: var(--text-on-ink-dim); margin-bottom: .7rem;
}
.ladder__control label b { color: var(--white); font-weight: 600; }

input[type='range'] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 100px;
  background: linear-gradient(90deg, var(--cell) 0%, var(--sun) 100%);
  cursor: grab;
}
input[type='range']:active { cursor: grabbing; }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--sun);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .5);
}
input[type='range']::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--sun); box-shadow: 0 3px 12px rgba(0, 0, 0, .5);
}

.ladder__out {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink-line);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin-top: 1.4rem;
}
@media (max-width: 620px) { .ladder__out { grid-template-columns: 1fr 1fr; } }

.ladder__out div { background: #0D2438; padding: .85rem .9rem; }
.ladder__out dt {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-on-ink-dim); margin-bottom: .3rem;
}
.ladder__out dd {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(.94rem, 1.35vw, 1.05rem);
  color: var(--white); letter-spacing: -.015em;
  white-space: nowrap;
}
.ladder__out dd.is-save { color: var(--grow); }
.ladder__out dd small { font-family: var(--mono); font-size: .6rem; font-weight: 500; color: var(--text-on-ink-dim); }

.ladder__verdict {
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: rgba(232, 148, 10, .12);
  border-left: 3px solid var(--sun);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: .88rem;
  color: var(--text-on-ink);
}
.ladder__verdict b { color: var(--sun-hi); }

.ladder__fine {
  margin-top: .9rem;
  font-family: var(--mono); font-size: .62rem; line-height: 1.55;
  color: #6E8395;
}

/* --- 9. Dải thông số nhà máy -------------------------------------------- */

.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 780px) { .rail { grid-template-columns: 1fr 1fr; } }

.rail div { background: var(--white); padding: 1.4rem 1.25rem; }
.rail dt {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  color: var(--ink); letter-spacing: -.02em; line-height: 1.1;
}
.rail dd {
  margin: .4rem 0 0;
  font-size: .82rem; color: var(--text-dim); line-height: 1.45;
}

/* --- 10. Thẻ ------------------------------------------------------------ */

.cards { display: grid; gap: 1.15rem; margin-top: 2.6rem; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards--3, .cards--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex; flex-direction: column;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover {
  border-color: var(--ink-3);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -26px rgba(10, 30, 48, .55);
}
.card__tag {
  font-family: var(--mono); font-size: .63rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--sun); margin-bottom: .85rem;
}
.card h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.card p { font-size: .93rem; color: var(--text-dim); }
.card__link {
  margin-top: auto; padding-top: 1.2rem;
  font-size: .9rem; font-weight: 700; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
}
.card__link:hover { color: var(--sun); }
.card__link::after { content: '→'; transition: transform .18s var(--ease); }
.card__link:hover::after { transform: translateX(4px); }

.ticks { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.ticks li {
  position: relative; padding-left: 1.6rem; margin-bottom: .55rem;
  font-size: .91rem; color: var(--text-dim);
}
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .52em;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--grow);
}
.band--ink .ticks li { color: var(--text-on-ink-dim); }

/* --- 11. Quy trình (thứ tự có ý nghĩa → đánh số) ------------------------ */

.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--ink-line);
  border-top: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line);
  margin-top: 2.6rem;
}
@media (max-width: 880px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .steps { grid-template-columns: 1fr; } }

.step { background: var(--ink); padding: 1.8rem 1.4rem; }
.step__n {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  color: var(--sun); letter-spacing: .12em; margin-bottom: 1.1rem;
  display: block;
}
.step h3 { font-size: 1.06rem; margin-bottom: .55rem; color: var(--white); }
.step p { font-size: .87rem; color: var(--text-on-ink-dim); }

/* --- 12. Bảng thông số -------------------------------------------------- */

.spec {
  width: 100%; border-collapse: collapse;
  font-size: .93rem; margin-top: 1.5rem;
}
.spec caption {
  text-align: left; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  padding-bottom: .85rem;
}
.spec th, .spec td { padding: .82rem .5rem; border-bottom: 1px solid var(--line); text-align: left; }
.spec th { font-weight: 500; color: var(--text-dim); width: 52%; }
.spec td { font-family: var(--mono); font-weight: 600; color: var(--ink); }

/* --- 13. Khu vực -------------------------------------------------------- */

.zones { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
/* Trên nền sáng phải dùng tông cyan đậm, tông --cell không đủ tương phản */
.zone {
  font-family: var(--mono); font-size: .84rem; font-weight: 600;
  padding: .55rem 1.1rem; border-radius: 100px;
  background: rgba(79, 195, 217, .16);
  border: 1px solid rgba(19, 96, 114, .35);
  color: #0F5566;
}
.band--ink .zone {
  background: rgba(79, 195, 217, .12);
  border-color: rgba(79, 195, 217, .35);
  color: var(--cell);
}

/* --- 14. Hỏi đáp -------------------------------------------------------- */

.faq { margin-top: 2.4rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600; font-size: 1.02rem; position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: .35rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.35rem; color: var(--sun);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 1.35rem; color: var(--text-dim); font-size: .95rem; max-width: 72ch; }

/* --- 15. Biểu mẫu ------------------------------------------------------- */

.form { display: grid; gap: 1.05rem; }
.form > .btn { justify-self: start; }
@media (max-width: 620px) { .form > .btn { justify-self: stretch; justify-content: center; } }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.field label {
  display: block; font-size: .82rem; font-weight: 600;
  margin-bottom: .45rem; color: var(--text-on-ink);
}
.field input, .field select, .field textarea {
  width: 100%; padding: .82rem .95rem;
  font-family: var(--body); font-size: .96rem;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-s);
}
.field input::placeholder, .field textarea::placeholder { color: #6E8395; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sun); background: rgba(255, 255, 255, .1);
}
.field select option { background: var(--ink-2); color: var(--white); }
.field textarea { resize: vertical; min-height: 110px; }

.form__note { font-size: .8rem; color: var(--text-on-ink-dim); }
.form__ok {
  padding: .95rem 1.1rem; border-radius: var(--radius-s);
  background: rgba(102, 185, 51, .14); border-left: 3px solid var(--grow);
  font-size: .9rem; color: var(--text-on-ink);
}
.form__ok[hidden] { display: none; }

/* --- 16. Sơ đồ hệ thống (xếp ngang trên desktop, dọc trên di động) ------ */

.flow {
  display: flex; align-items: stretch; gap: 0;
  margin-top: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 860px) { .flow { flex-direction: column; } }

.flow__node {
  flex: 1;
  padding: 1.5rem 1.25rem;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.flow__node:last-child { border-right: 0; }
@media (max-width: 860px) {
  .flow__node { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow__node:last-child { border-bottom: 0; }
}

.flow__node--store { background: var(--paper-2); }

.flow__icon {
  width: 40px; height: 40px; margin-bottom: 1rem;
  color: var(--cell);
}
.flow__node--store .flow__icon { color: var(--grow); }
.flow__node--grid .flow__icon { color: var(--sun); }

.flow__step {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: .5rem;
}
.flow__node h3 { font-size: 1.02rem; margin-bottom: .45rem; }
.flow__node p { font-size: .85rem; color: var(--text-dim); }

.diagram figcaption {
  font-family: var(--mono); font-size: .68rem; color: var(--text-dim);
  margin-top: 1.1rem; line-height: 1.65; max-width: 78ch;
}

/* --- 16b. Công cụ tính hoàn vốn ----------------------------------------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 2.6rem;
}
@media (max-width: 940px) { .calc { grid-template-columns: 1fr; } }

.calc__panel {
  background: linear-gradient(168deg, var(--ink-2), #0D2438);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.calc__group { padding-block: 1.15rem; border-bottom: 1px solid var(--ink-line); }
.calc__group:first-child { padding-top: 0; }
.calc__group:last-child { border-bottom: 0; padding-bottom: 0; }

.calc__label {
  display: block;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-on-ink-dim); margin-bottom: .75rem;
}

.calc__money {
  width: 100%;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.02em;
  color: var(--white); background: transparent;
  border: 0; border-bottom: 2px solid var(--ink-line);
  padding: .2rem 0 .5rem;
}
.calc__money:focus { border-bottom-color: var(--sun); outline: none; }
.calc__unit { font-family: var(--mono); font-size: .7rem; color: var(--text-on-ink-dim); margin-left: .4rem; }

/* Chọn loại công trình */
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label {
  display: block; text-align: center; cursor: pointer;
  padding: .65rem .4rem; border-radius: var(--radius-s);
  border: 1.5px solid var(--ink-line);
  font-size: .82rem; font-weight: 600; color: var(--text-on-ink-dim);
  transition: border-color .16s var(--ease), color .16s var(--ease), background-color .16s var(--ease);
}
.pick label:hover { color: var(--white); }
.pick input:checked + label {
  border-color: var(--sun); color: var(--ink); background: var(--sun);
}
.pick input:focus-visible + label { outline: 3px solid var(--sun-hi); outline-offset: 2px; }
.pick small { display: block; font-weight: 400; font-size: .66rem; opacity: .75; margin-top: .15rem; }

/* Bật/tắt pin lưu trữ */
.toggle { display: flex; align-items: center; gap: .7rem; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--grow); cursor: pointer; }
.toggle span { font-size: .93rem; color: var(--text-on-ink); font-weight: 600; }
.calc__sub { display: flex; align-items: center; gap: .6rem; margin-top: .85rem; }
.calc__sub select {
  background: rgba(255,255,255,.06); color: var(--white);
  border: 1px solid var(--ink-line); border-radius: var(--radius-s);
  padding: .5rem .7rem; font-family: var(--body); font-size: .88rem;
}
.calc__sub select:disabled { opacity: .4; cursor: not-allowed; }
.calc__sub label { font-size: .84rem; color: var(--text-on-ink-dim); }

.calc__price { display: flex; align-items: center; gap: .5rem; }
.calc__price input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.06); color: var(--white);
  border: 1px solid var(--ink-line); border-radius: var(--radius-s);
  padding: .55rem .7rem; font-family: var(--mono); font-size: .88rem; font-weight: 600;
}
.calc__price input:focus { border-color: var(--sun); outline: none; }
.calc__reset {
  background: transparent; border: 1px solid var(--ink-line); color: var(--text-on-ink-dim);
  border-radius: var(--radius-s); padding: .55rem .7rem; font-size: .76rem;
  cursor: pointer; white-space: nowrap; font-family: var(--body);
}
.calc__reset:hover { color: var(--white); border-color: var(--text-on-ink-dim); }

/* Kết quả */
.calc__out { display: grid; gap: 1px; background: var(--ink-line); border-radius: var(--radius-s); overflow: hidden; }
.calc__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--ink-line); }
@media (max-width: 620px) { .calc__kpis { grid-template-columns: 1fr 1fr; } }
.calc__kpis > div { background: #0D2438; padding: 1rem .95rem; }
.calc__kpis dt {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-on-ink-dim); margin-bottom: .35rem;
}
.calc__kpis dd {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--white);
  letter-spacing: -.015em; white-space: nowrap;
}
.calc__kpis dd small { font-family: var(--mono); font-size: .58rem; font-weight: 500; color: var(--text-on-ink-dim); }
.calc__kpis dd.is-hero { color: var(--sun); font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.calc__kpis dd.is-save { color: var(--grow); }

.calc__verdict {
  padding: 1rem 1.1rem; background: rgba(79, 195, 217, .1);
  border-left: 3px solid var(--cell); border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: .9rem; color: var(--text-on-ink); margin-top: 1.25rem;
}
.calc__verdict b { color: var(--white); }

/* Bảng bóc tách chi phí */
.breakdown { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.breakdown li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--ink-line);
  font-size: .87rem; color: var(--text-on-ink-dim);
}
.breakdown li b { font-family: var(--mono); color: var(--text-on-ink); white-space: nowrap; }
.breakdown li.is-total { border-bottom: 0; color: var(--white); font-weight: 600; }
.breakdown li.is-total b { color: var(--sun); font-size: 1rem; }

/* Biểu đồ dòng tiền */
.cashflow { margin-top: 1.5rem; }
.cashflow__legend {
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .8rem;
  font-family: var(--mono); font-size: .66rem; color: var(--text-on-ink-dim);
}
.cashflow__legend span { display: inline-flex; align-items: center; gap: .45rem; }
.cashflow__legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.cashflow__plot { height: 210px; }
@media (max-width: 560px) { .cashflow__plot { height: 170px; } }
.cashflow__plot svg { width: 100%; height: 100%; display: block; }
.cashflow__axis {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: .62rem; color: var(--text-on-ink-dim);
  margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--ink-line);
}
.cashflow__note {
  margin-top: .9rem; font-size: .84rem; color: var(--text-on-ink-dim); line-height: 1.6;
}
.cashflow__note b { color: var(--sun-hi); }

/* --- 16c. Ảnh --------------------------------------------------------- */

/* Khung ảnh giữ đúng tỉ lệ để trang không bị giật khi ảnh tải xong */
.shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.band--ink .shot { border-color: var(--ink-line); background: var(--ink-2); }

.shot--wide  { aspect-ratio: 24 / 9; }
.shot--band  { aspect-ratio: 21 / 9; }
.shot--card  { aspect-ratio: 16 / 10; }
.shot--tall  { aspect-ratio: 4 / 5; }

/* Ảnh trong thẻ: tràn hết bề ngang thẻ, nằm sát mép trên */
.card__shot {
  margin: -1.6rem -1.6rem 1.35rem;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

/* Ảnh sản phẩm nền sáng — không cắt, để nguyên dáng sản phẩm */
.shot--product {
  background: linear-gradient(160deg, #FFFFFF, var(--paper));
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.shot--product img { width: auto; max-height: 100%; object-fit: contain; }

/* Lưới ảnh */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

.gallery figure { margin: 0; }
.gallery figcaption {
  font-size: .84rem; color: var(--text-dim); margin-top: .65rem; line-height: 1.5;
}
.band--ink .gallery figcaption { color: var(--text-on-ink-dim); }

/* Ảnh nằm cạnh khối chữ */
.media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 2.6rem;
}
.media--flip > .shot { order: -1; }
@media (max-width: 860px) {
  .media { grid-template-columns: 1fr; }
  .media--flip > .shot { order: 0; }
}

/* --- 17. Chân trang ----------------------------------------------------- */

.foot { background: #061525; color: var(--text-on-ink-dim); padding-block: 3.5rem 2rem; }
.foot__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.4rem;
  padding-bottom: 2.4rem; border-bottom: 1px solid var(--ink-line);
}
@media (max-width: 820px) { .foot__grid { grid-template-columns: 1fr; gap: 1.9rem; } }

.foot img { height: 44px; width: auto; background: var(--white); padding: 6px 11px; border-radius: var(--radius-s); }
.foot h4 {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--white); margin-bottom: 1rem; font-weight: 500;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .6rem; font-size: .9rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--sun); }
.foot__tel {
  font-family: var(--mono); font-size: 1.3rem; font-weight: 600;
  color: var(--sun); text-decoration: none; display: inline-block; margin-top: .4rem;
}
.foot__base {
  padding-top: 1.5rem; font-size: .78rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
}

/* --- 18. Nút gọi cố định trên di động ----------------------------------- */

.dock { display: none; }
@media (max-width: 720px) {
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--ink-line);
    box-shadow: 0 -8px 26px -12px rgba(0, 0, 0, .6);
  }
  .dock a {
    padding: .95rem; text-align: center; text-decoration: none;
    font-weight: 700; font-size: .93rem;
  }
  .dock__call { background: var(--sun); color: var(--ink); }
  .dock__zalo { background: var(--grow); color: #06240B; }
  body { padding-bottom: 58px; }
}

/* --- 19. Tôn trọng thiết lập giảm chuyển động --------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
