/* ==========================================================
   Portfolio Nguyễn Tấn Đạt
   Màu sắc: sửa các biến bên dưới. Một màu nhấn duy nhất (--accent).
   ========================================================== */
:root,
[data-theme="light"] {
  --pad-y: 28px;
  --bg: #F3F2FA;
  --tile: #FFFFFF;
  --ink: #12112A;
  --muted: #4A4868;
  --line: #E3E1F2;
  --accent: #4B35E8;
  --on-accent: #FFFFFF;
  --accent-soft: #ECEAFD;
  --accent-text: #3B27C9;
  --hero-bg: #4B35E8;
  --hero-border: transparent;
  --hero-ink: #FFFFFF;
  --hero-muted: #E4E0FF;
  --hero-chip-bg: rgba(255, 255, 255, 0.16);
  --hero-chip-ink: #FFFFFF;
  --hero-btn-bg: #FFFFFF;
  --hero-btn-hover: #F3F2FA;
  --hero-btn-ink: #12112A;
  --hero-ghost-border: rgba(255, 255, 255, 0.7);
  --hero-ghost-border-hover: #FFFFFF;
  --hero-ghost-hover-bg: rgba(255, 255, 255, 0.1);
  --hero-ghost-ink: #FFFFFF;
  --deep: #12112A;
  --deep-ink: #FFFFFF;
  --deep-muted: #C9C6E6;
  --deep-line: #45426B;
  --deep-accent: #A99CFF;
  --deep-on-accent: #12112A;
  --term-bg: #08071A;
  --term-ink: #E8E6FA;
  --term-muted: #A9A6C8;
  --term-line: #25223F;
  --term-dot: #3A3760;
  --avatar-bg: #DCD8FB;
  --plate-bg: var(--tile);
  --plate-border: transparent;
  --header-bg: rgba(243, 242, 250, 0.82);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0B0A17;
  --tile: #151329;
  --ink: #F1F0FB;
  --muted: #A9A6C8;
  --line: #2A2747;
  --accent: #8D7CFF;
  --on-accent: #0B0A17;
  --accent-soft: #1F1B40;
  --accent-text: #B9AFFF;
  --hero-bg: #1F1B40;
  --hero-border: #38316B;
  --hero-ink: #F1F0FB;
  --hero-muted: #C8C4E8;
  --hero-chip-bg: rgba(141, 124, 255, 0.16);
  --hero-chip-ink: #B9AFFF;
  --hero-btn-bg: #8D7CFF;
  --hero-btn-hover: #A092FF;
  --hero-btn-ink: #0B0A17;
  --hero-ghost-border: #4A4280;
  --hero-ghost-border-hover: #8D7CFF;
  --hero-ghost-hover-bg: rgba(141, 124, 255, 0.1);
  --hero-ghost-ink: #F1F0FB;
  --deep: #151329;
  --deep-ink: #F1F0FB;
  --deep-muted: #A9A6C8;
  --deep-line: #2A2747;
  --deep-accent: #8D7CFF;
  --deep-on-accent: #0B0A17;
  --term-bg: #0B0A17;
  --term-ink: #F1F0FB;
  --term-muted: #A9A6C8;
  --term-line: #2A2747;
  --term-dot: #2A2747;
  --avatar-bg: #151329;
  --plate-bg: #0B0A17;
  --plate-border: #2A2747;
  --header-bg: rgba(11, 10, 23, 0.82);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--accent-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--tile); color: var(--ink); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Thanh điều hướng ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; }
.seg button { min-height: 38px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.seg svg { width: 16px; height: 16px; }

/* ---------- Lưới bento ---------- */
main { padding: var(--pad-y) 0; }
.section { margin-top: 40px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 44em; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.section-head p { font-size: 18px; color: var(--muted); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.bento + .bento { margin-top: 16px; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.tile { background: var(--tile); border-radius: 28px; padding: var(--pad-y) 28px; min-width: 0; }
.tile-lg { border-radius: 32px; padding: var(--pad-y) 36px; }

/* ---------- Hero ---------- */
.hero-main { background: var(--hero-bg); color: var(--hero-ink); border: 1px solid var(--hero-border); display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.chip { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; border-radius: 999px; padding: 6px 14px; }
.hero-main .chip { background: var(--hero-chip-bg); color: var(--hero-chip-ink); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero-main h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; }
.hero-main .lead { font-size: 18px; color: var(--hero-muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 16px; font-weight: 600; text-decoration: none; transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-white { background: var(--hero-btn-bg); color: var(--hero-btn-ink); font-weight: 700; }
.btn-white:hover { background: var(--hero-btn-hover); color: var(--hero-btn-ink); }
.btn-ghost { border: 1.5px solid var(--hero-ghost-border); color: var(--hero-ghost-ink); }
.btn-ghost:hover { border-color: var(--hero-ghost-border-hover); background: var(--hero-ghost-hover-bg); color: var(--hero-ghost-ink); }

.avatar { position: relative; background: var(--avatar-bg); padding: 0; overflow: hidden; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); text-align: center; padding: 24px 24px 90px; font-size: 14px; }
.avatar-empty svg { width: 110px; height: 110px; }
.avatar-plate { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--plate-bg); border: 1px solid var(--plate-border); color: var(--ink); border-radius: 18px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; }
.avatar-plate strong { font-weight: 600; }
.avatar-plate span { font-size: 14px; color: var(--muted); }

/* ---------- Số liệu và công nghệ ---------- */
.stat-num { font-size: clamp(2.5rem, 4.5vw, 3.75rem); line-height: 1; font-weight: 700; letter-spacing: -0.04em; color: var(--accent-text); }
.stat-label { margin-top: 10px; color: var(--muted); }
.stack { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.stack h3 { font-size: 18px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 500; background: var(--accent-soft); color: var(--accent-text); border-radius: 10px; padding: 7px 13px; }

/* ---------- Khách hàng ---------- */
.clients { display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; }
.clients-head { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; padding-right: 28px; border-right: 1px solid var(--line); }
.clients-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.clients .label { color: var(--muted); font-size: 14px; }
.clients-list { flex: 1 1 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 12px; }
.client-item { position: relative; z-index: 1; height: 64px; padding: 8px 12px; border-radius: 14px; background: transparent; display: flex; align-items: center; justify-content: center; transform-origin: center center; transition: transform 0.22s ease, background-color 0.22s ease; }
.client-item:hover,
.client-item:focus-within { z-index: 3; background: var(--bg); transform: scale(1.1); }
[data-theme="dark"] .client-item { background: #F3F2FA; }
[data-theme="dark"] .client-item:hover,
[data-theme="dark"] .client-item:focus-within { background: #FFFFFF; }
.client-link { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.client-item img { max-width: 124px; max-height: 48px; width: auto; height: auto; object-fit: contain; display: block; }

/* ---------- Hệ thống ---------- */
.sys { display: flex; flex-direction: column; gap: 14px; border: 1px solid transparent; transition: transform 0.2s ease, border-color 0.2s ease; }
.sys:hover { transform: translateY(-4px); border-color: var(--accent); }
.sys-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sys-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.sys-icon svg { width: 24px; height: 24px; }
.sys-tag { font-size: 13px; color: var(--muted); }
.sys h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
.sys p { color: var(--muted); margin-top: 6px; }
.badge { align-self: flex-start; margin-top: auto; font-size: 13px; font-weight: 600; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 12px; }
.badge-legacy { background: var(--bg); color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.sys-vision .badge-legacy { background: var(--tile); }
.sys-live { border-color: var(--accent); }
.sys-vision { position: relative; background: var(--accent-soft); }
.sys-vision .sys-icon { background: var(--accent); color: var(--on-accent); }
.sys-vision::before, .sys-vision::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); }
.sys-vision::before { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.sys-vision::after { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.sys-vision .sys-tag { margin-right: 34px; }

/* ---------- Chuyển đổi công nghệ ---------- */
.deep { background: var(--deep); color: var(--deep-ink); display: flex; flex-direction: column; gap: 18px; }
.deep h3 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.deep p { color: var(--deep-muted); }
.moves { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; font-size: 16px; }
.move { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.move .from { color: var(--deep-muted); border: 1px solid var(--deep-line); border-radius: 10px; padding: 8px 14px; }
.move .to { background: var(--deep-accent); color: var(--deep-on-accent); font-weight: 600; border-radius: 10px; padding: 8px 14px; }
.move svg { width: 28px; height: 16px; color: var(--deep-accent); flex: 0 0 auto; }
.term { background: var(--term-bg); color: var(--term-ink); padding: 0; overflow: hidden; border: 1px solid var(--deep-line); display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--term-line); font-size: 13px; color: var(--term-muted); }
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--term-dot); }
.term-dots i:last-child { background: var(--deep-accent); }
.term-body { padding: var(--pad-y) 24px; font-size: 14.5px; line-height: 1.9; overflow-x: auto; }
.term-cmd { white-space: pre; }
.term-cmd b { color: var(--deep-accent); font-weight: 700; }
.term-row { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.term-row .st { font-weight: 700; flex: 0 0 4.5em; }
.term-row .st-done { color: var(--deep-accent); }
.term-row .st-next { color: var(--term-muted); }
.term-row .nm { flex: 1 1 200px; }
.term-row .nt { color: var(--term-muted); }
.caret { display: inline-block; width: 9px; height: 18px; background: var(--deep-accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Lộ trình ---------- */
.step { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); }
.step-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.step-top strong { font-size: 19px; font-weight: 600; }
.pill { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); }
.step-now { border-color: var(--accent); }
.step-now .pill { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step .what { color: var(--muted); font-size: 15px; }
.step .when { color: var(--muted); font-size: 13px; }

/* ---------- Kỹ năng ---------- */
.skills h3, .how h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.skill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.skill-row dt { flex: 0 0 170px; color: var(--muted); font-size: 15px; }
.skill-row dd { flex: 1 1 240px; }
.skill-row .chips li { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
[data-theme="dark"] .skill-row .chips li { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.how li { padding: 16px 0; border-top: 1px solid var(--line); font-size: 17px; }

/* ---------- Dự án đại học ---------- */
.uni h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.uni li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.uni .n { flex: 1 1 300px; font-weight: 600; }
.uni .r { flex: 1 1 200px; font-size: 15px; color: var(--muted); }
.uni .t { flex: 1 1 260px; font-size: 13px; color: var(--muted); }
.uni .w { font-size: 13px; color: var(--muted); }

/* ---------- Liên hệ & Trợ lý AI ---------- */
.contact { background: var(--hero-bg); color: var(--hero-ink); border: 1px solid var(--hero-border); display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.contact p { font-size: 18px; color: var(--hero-muted); max-width: 30em; }

.chat { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.chat-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.chat-top label { font-size: 18px; font-weight: 600; }
.chat-top-right { display: inline-flex; align-items: center; gap: 8px; }
.soon { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.chat-live { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.chat-reset { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.chat-reset:hover { color: var(--ink); border-color: var(--accent); }

.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 150px; max-height: 280px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.bubble { max-width: 90%; padding: 10px 14px; font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.bubble code { font-size: 13px; padding: 1px 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); }
.bubble-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; color: var(--ink); }
.bubble-user { align-self: flex-end; background: var(--accent); border: 1px solid transparent; border-radius: 16px 16px 4px 16px; color: var(--on-accent); }
.bubble-err { border-color: rgba(220, 38, 38, 0.45); color: var(--muted); }
.email-sent-badge { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(22, 163, 74, 0.14); color: #15803D; }
[data-theme="dark"] .email-sent-badge { background: rgba(34, 197, 94, 0.16); color: #86EFAC; }

@keyframes chatBounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-4px); opacity: 1; } }
.bubble-typing { display: inline-flex; align-items: center; gap: 5px; padding: 13px 16px; }
.bubble-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatBounce 1.2s infinite ease-in-out; }
.bubble-typing span:nth-child(2) { animation-delay: 0.16s; }
.bubble-typing span:nth-child(3) { animation-delay: 0.32s; }

.chat-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
.prompt-chip:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }

.chat-form { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chat-form input[type="text"]:not(.hp-field) { flex: 1 1 160px; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 14.5px; transition: border-color 0.15s ease; }
.chat-form input[type="text"]:not(.hp-field):focus { outline: none; border-color: var(--accent); }
.chat-form input:disabled { opacity: 0.65; cursor: not-allowed; }
.chat-form button { min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease; }
.chat-form button:hover:not(:disabled) { opacity: 0.92; }
.chat-form button:disabled { background: var(--bg); border-color: var(--line); color: var(--muted); cursor: not-allowed; }

.footer { padding: var(--pad-y) 0; font-size: 13px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.admin-link { color: var(--muted); text-decoration: none; opacity: 0.65; transition: opacity 0.15s ease, color 0.15s ease; }
.admin-link:hover { opacity: 1; color: var(--accent-text); }
.admin-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-size: 13px; font-weight: 600; box-shadow: 0 10px 26px rgba(18, 17, 42, 0.24); transition: transform 0.15s ease; }
.admin-fab:hover { color: var(--on-accent); transform: translateY(-2px); }
.admin-fab svg { width: 15px; height: 15px; }

/* ---------- Hiệu ứng lúc tải trang (một lần) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.first-load .hero .tile { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.first-load .hero .tile:nth-child(2) { animation-delay: 0.1s; }

/* ---------- Hiệu ứng chuyển chủ đề sáng/tối (View Transitions) ----------
   app.js điều khiển clip-path của lớp giao diện mới; ở đây tắt hiệu ứng mờ mặc định. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 960px) {
  .s3 { grid-column: span 6; }
  .s4, .s5, .s7, .s8 { grid-column: span 12; }
  .stat.s4 { grid-column: span 4; }
  .sys.s4 { grid-column: span 6; }
  .step.s4 { grid-column: span 12; }
  .tile-lg { padding: var(--pad-y) 28px; }
  .avatar { min-height: 420px; }
  .clients { flex-direction: column; align-items: stretch; }
  .clients-head { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; padding-right: 0; padding-bottom: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .clients-list { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
@media (max-width: 620px) {
  .s3, .s6, .stat.s4, .sys.s4 { grid-column: span 12; }
  .wrap { padding: 0 16px; }
  .tile { padding: var(--pad-y) 22px; border-radius: 22px; }
  .tile-lg { padding: var(--pad-y) 22px; border-radius: 24px; }
  .avatar { padding: 0; }
  .nav { order: 3; width: 100%; }
  .seg .txt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
