/* =========================================================
   iqc.xyz
   ========================================================= */
:root {
    --paper: #eef0ee;
    --paper-2: #e4e8e6;
    --white: #fbfcfb;
    --ink: #10161b;
    --ink-2: #38434c;
    --muted: #667179;
    --grid: rgba(16, 22, 27, 0.07);
    --line: rgba(16, 22, 27, 0.16);
    --line-2: rgba(16, 22, 27, 0.32);
    --orange: #ff5a0a;
    --orange-d: #d94700;
    --orange-l: #ff8a4d;
    --green: #0f9d58;
    --green-d: #0b7a44;
    --red: #d42f26;

    --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
    --sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    --wrap: 1200px;
    --nav-h: 68px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--paper);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 1.04rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.lang-pending body {
    visibility: hidden;
}

::selection {
    background: var(--orange);
    color: var(--ink);
}

a {
    color: inherit;
}

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

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 32px;
}

.mono {
    font-family: var(--mono);
}

[hidden] {
    display: none !important;
}

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

.skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.skip:focus {
    top: 12px;
}

em {
    font-style: normal;
    color: var(--orange-d);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 2px solid var(--ink);
    border-radius: 2px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}

.btn:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
}

.btn:active {
    transform: translateY(1px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.9rem;
}

.btn-light {
    background: transparent;
    border-color: rgba(238, 240, 238, 0.45);
    color: var(--paper);
}

.btn-light:hover {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
}

.btn-accent {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
}

.btn-accent:hover {
    background: var(--paper);
    border-color: var(--paper);
}

/* ---------- Header ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s;
}

.nav.scrolled {
    background: rgba(238, 240, 238, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: var(--line-2);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    height: var(--nav-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    text-decoration: none;
}

.logo-mark {
    width: 26px;
    height: 26px;
}

.logo-word {
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.logo-tld {
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.nav-menu {
    margin-right: auto;
}

.nav-menu ul {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-menu a {
    position: relative;
    padding: 4px 0;
    font-size: 0.97rem;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s var(--ease);
}

.nav-menu a:hover {
    color: var(--ink);
}

.nav-menu a:hover::after {
    transform: scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang {
    display: inline-flex;
    border: 2px solid var(--ink);
    border-radius: 2px;
    overflow: hidden;
}

.lang button {
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lang button + button {
    border-left: 2px solid var(--ink);
}

.lang button:hover {
    background: var(--paper-2);
}

.lang button[aria-pressed='true'] {
    background: var(--ink);
    color: var(--paper);
}

.nav-menu-login {
    display: none;
}

.nav-login {
    border-width: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 36px;
    padding: 0 9px;
    border: 2px solid var(--ink);
    border-radius: 2px;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s var(--ease);
}

.nav-toggle.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: calc(var(--nav-h) + 72px) 0 104px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.pill {
    padding: 3px 10px;
    background: var(--orange);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pill-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--green);
    color: var(--white);
}

.pill-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--white);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.kicker-text {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.hero-title {
    font-family: var(--display);
    font-size: clamp(2.9rem, 6.6vw, 5.6rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.005em;
    color: var(--ink);
}

.lead {
    max-width: 33em;
    margin-top: 24px;
    font-size: 1.18rem;
    color: var(--ink-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.honest {
    max-width: 34em;
    margin-top: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--orange);
    font-size: 0.92rem;
    color: var(--muted);
}

.honest a {
    color: var(--ink);
    font-weight: 600;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ---------- Lot card ---------- */
.lot-wrap {
    justify-self: center;
    width: 100%;
    max-width: 430px;
}

.lot {
    position: relative;
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 rgba(16, 22, 27, 0.14);
}

.js .lot {
    animation: rise 0.7s var(--ease) 0.1s both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.lot-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.lot-tag {
    padding: 1px 8px;
    border: 1px solid var(--orange);
    color: var(--orange-l);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lot-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line-2);
}

.lot-meta > div {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
}

.lot-meta > div:nth-child(odd):not(.wide) {
    border-right: 1px solid var(--line);
}

.lot-meta .wide {
    grid-column: 1 / -1;
}

.lot-meta > div:last-child {
    border-bottom: 0;
}

.lot-meta dt {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.lot-meta dd {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--ink);
}

.lot-meta dd.mono {
    font-size: 0.9rem;
}

.lot-plan {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line-2);
}

.lot-plan > div {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
}

.lot-plan > div + div {
    border-left: 1px solid var(--line);
}

.lot-plan span {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.lot-plan b {
    font-family: var(--display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.lot-plan > div:nth-child(3) b {
    color: var(--orange-d);
}

.lot-counter {
    padding: 14px 16px 16px;
}

.lot-counter-label {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.lot-counter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
}

.step-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--ink);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.step-btn.plus {
    background: var(--ink);
    color: var(--paper);
}

.step-btn:hover:not(:disabled) {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
}

.step-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.step-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#lcCount {
    min-width: 2.4ch;
    font-family: var(--display);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.link-btn {
    margin-left: auto;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.link-btn:hover {
    color: var(--ink);
}

.meter {
    display: flex;
    gap: 3px;
}

.meter i {
    flex: 1;
    height: 14px;
    border: 1px solid var(--line-2);
    background: transparent;
    transition: background 0.15s, border-color 0.15s;
}

.meter i.bad {
    border-color: var(--red);
}

.meter i.ok.on {
    background: var(--green);
    border-color: var(--green);
}

.meter i.bad.on {
    background: var(--red);
}

.verdict {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px dashed var(--line-2);
    background: rgba(15, 157, 88, 0.07);
    transition: background 0.2s;
}

.verdict[data-state='hold'] {
    background: rgba(212, 47, 38, 0.08);
}

.stamp {
    flex-shrink: 0;
    padding: 4px 12px 2px;
    border: 3px solid var(--green-d);
    border-radius: 3px;
    color: var(--green-d);
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(-4deg);
}

.verdict[data-state='hold'] .stamp {
    border-color: var(--red);
    color: var(--red);
    animation: stamp-in 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes stamp-in {
    from { transform: rotate(-4deg) scale(1.5); opacity: 0.2; }
    to { transform: rotate(-4deg) scale(1); opacity: 1; }
}

.verdict p {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ink);
}

.lot figcaption {
    padding: 8px 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.66rem;
    color: var(--muted);
}

/* ---------- Sections ---------- */
.section {
    padding: 110px 0;
    border-top: 2px solid var(--ink);
}

.section-alt {
    background: var(--paper-2);
}

.sec-head {
    margin-bottom: 52px;
}

.sec-no {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.sec-no .mono {
    padding: 2px 8px;
    background: var(--ink);
    color: var(--paper);
    letter-spacing: 0.04em;
}

.h2 {
    max-width: 18em;
    font-family: var(--display);
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.003em;
    color: var(--ink);
}

.sub {
    max-width: 38em;
    margin-top: 16px;
    font-size: 1.1rem;
}

h3 {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink);
}

/* ---------- Pains ---------- */
.pains {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px 56px;
    list-style: none;
}

.pain {
    padding-top: 18px;
    border-top: 3px solid var(--ink);
}

.pain-no {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange-d);
}

.pain h3 {
    margin: 8px 0 10px;
    font-size: 1.8rem;
}

.pain p {
    max-width: 30em;
}

/* ---------- Flow ---------- */
.flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    list-style: none;
}

.fstep {
    display: flex;
    flex-direction: column;
    padding: 20px 20px 22px;
    background: var(--white);
    border: 2px solid var(--line-2);
}

.fstep-try {
    border-color: var(--ink);
    box-shadow: 6px 6px 0 var(--orange);
}

.fstep-link {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: var(--orange-d);
    text-decoration: none;
}

.fstep-link:hover {
    text-decoration: underline;
}

.fstep-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.fstep-no {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.tag {
    padding: 2px 8px;
    border: 1.5px solid var(--ink-2);
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tag-design {
    border-style: dashed;
    color: var(--muted);
    border-color: var(--muted);
}

.tag-live {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

.fstep h3 {
    margin-bottom: 8px;
}

.fstep p {
    font-size: 0.97rem;
}

.fstep-out {
    margin-top: auto;
    padding-top: 16px !important;
    border-top: 1px dashed var(--line-2);
    font-size: 0.88rem !important;
    color: var(--ink) !important;
}

.fstep-out .mono {
    display: block;
    margin: 12px 0 2px;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.fstep > p:not(.fstep-out) {
    margin-bottom: 18px;
}

/* ---------- Calculator ---------- */
.calc {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    border: 2px solid var(--ink);
    background: var(--white);
    box-shadow: 8px 8px 0 rgba(16, 22, 27, 0.14);
}

/* Cho phép ô lưới co lại; bảng kết quả tự cuộn ngang trong .table-wrap */
.calc > * {
    min-width: 0;
}

.calc-form {
    padding: 26px 26px 22px;
}

.panel-title {
    margin-bottom: 18px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field label,
.field-set legend {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
}

.field-set {
    margin: 4px 0 0;
    padding: 0;
    border: 0;
}

.field-set legend {
    margin-bottom: 8px;
    padding: 0;
}

.field-inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.field-inline label {
    font-weight: 500;
}

.field-inline select {
    width: 150px;
}

.calc-form input,
.calc-form select {
    padding: 10px 12px;
    border: 2px solid var(--line-2);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.95rem;
    transition: border-color 0.15s;
}

.calc-form input:hover,
.calc-form select:hover {
    border-color: var(--ink-2);
}

.calc-form input:focus,
.calc-form select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(255, 90, 10, 0.35);
}

.calc-form select,
.wl select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2310161b' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.calc-hint {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line-2);
    font-size: 0.88rem;
    color: var(--muted);
}

.calc-out {
    padding: 26px 28px 22px;
    background: var(--ink);
    color: rgba(238, 240, 238, 0.85);
}

.calc-out .panel-title {
    color: var(--orange-l);
}

.calc-err {
    padding: 12px 14px;
    border-left: 4px solid var(--orange);
    background: rgba(255, 90, 10, 0.12);
    color: var(--paper);
    font-size: 0.95rem;
}

.calc-say {
    margin-bottom: 20px;
    font-size: 1.12rem;
    line-height: 1.5;
    color: var(--paper);
}

.table-wrap {
    overflow-x: auto;
}

.plan-table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.plan-table th {
    padding: 8px 10px;
    border-bottom: 2px solid rgba(238, 240, 238, 0.5);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    color: rgba(238, 240, 238, 0.65);
}

.plan-table td {
    padding: 11px 10px;
    border-bottom: 1px solid rgba(238, 240, 238, 0.14);
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--paper);
    white-space: nowrap;
}

.plan-table td.cls {
    font-family: var(--sans);
    font-weight: 600;
}

.plan-table td.strong {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.plan-table td.strong:nth-last-child(2) {
    color: #5fe0a0;
}

.plan-table td.strong:last-child {
    color: var(--orange-l);
}

.calc-notes {
    margin-top: 16px;
    list-style: none;
}

.calc-notes li {
    position: relative;
    margin-top: 8px;
    padding-left: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.calc-notes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 7px;
    height: 7px;
    background: var(--orange);
}

.calc-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.copy-ok {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: #5fe0a0;
}

.howto {
    margin-top: 24px;
    border: 2px solid var(--line-2);
    background: var(--white);
}

.howto summary {
    position: relative;
    padding: 16px 52px 16px 20px;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
}

.howto summary::-webkit-details-marker,
.faq summary::-webkit-details-marker {
    display: none;
}

.howto summary::after,
.faq summary::after {
    content: '+';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 1rem;
    line-height: 26px;
    text-align: center;
    transition: transform 0.2s var(--ease), background 0.15s;
}

.howto[open] summary::after,
.faq details[open] summary::after {
    transform: rotate(45deg);
    background: var(--orange);
    color: var(--ink);
}

.howto-body {
    padding: 0 20px 20px;
    border-top: 1px dashed var(--line-2);
}

.howto-body ol {
    margin: 16px 0 0 1.3em;
}

.howto-body li {
    margin-top: 6px;
}

.howto-body p {
    margin-top: 14px;
    max-width: 52em;
    font-size: 0.97rem;
}

/* ---------- Roles ---------- */
.roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.role {
    padding: 26px 28px 30px;
    border: 2px solid var(--ink);
}

.role-ai {
    background: var(--white);
    border-top: 8px solid var(--orange);
}

.role-human {
    background: var(--ink);
    border-top: 8px solid var(--paper);
    color: rgba(238, 240, 238, 0.85);
}

.role-h {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 1.9rem;
}

.role-h .mono {
    padding: 3px 9px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.role-human .role-h {
    color: var(--paper);
}

.role-human .role-h .mono {
    background: var(--paper);
    color: var(--ink);
}

.role ul {
    list-style: none;
}

.role li {
    position: relative;
    padding: 10px 0 10px 24px;
    border-top: 1px solid var(--line);
    font-size: 1.02rem;
}

.role-human li {
    border-top-color: rgba(238, 240, 238, 0.16);
}

.role li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 10px;
    height: 10px;
    border: 2px solid var(--orange-d);
}

.role-human li::before {
    border-color: var(--orange-l);
}

.rule {
    max-width: 52em;
    margin-top: 28px;
    padding: 14px 18px;
    border-left: 6px solid var(--orange);
    background: var(--white);
    font-size: 1.04rem;
    color: var(--ink);
}

/* ---------- Local ---------- */
.local {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    list-style: none;
}

.local li {
    padding-top: 16px;
    border-top: 3px solid var(--ink);
}

.local li::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    margin-bottom: 14px;
    background: var(--orange);
}

.local h3 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.local p {
    font-size: 0.99rem;
}

/* ---------- Demo ---------- */
.cta-band {
    background: var(--ink);
    color: rgba(238, 240, 238, 0.82);
    text-align: center;
    border-top-color: var(--orange);
}

.cta-band .sec-no {
    color: var(--paper);
}

.cta-band .sec-no .mono {
    background: var(--orange);
    color: var(--ink);
}

.cta-band .h2 {
    margin: 0 auto;
    color: var(--paper);
}

.cta-band em {
    color: var(--orange-l);
}

.cta-band .sub {
    margin-left: auto;
    margin-right: auto;
}

.wl {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 780px;
    margin: 34px auto 0;
}

.wl input,
.wl select {
    flex: 1 1 230px;
    min-width: 0;
    padding: 13px 14px;
    border: 2px solid rgba(238, 240, 238, 0.4);
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.wl select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23eef0ee' stroke-width='1.6'/%3E%3C/svg%3E");
}

.wl select option {
    background: var(--ink);
    color: var(--paper);
}

.wl input::placeholder {
    color: rgba(238, 240, 238, 0.5);
}

.wl input:hover,
.wl select:hover {
    border-color: rgba(238, 240, 238, 0.7);
}

.wl input:focus,
.wl select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 10, 0.3);
}

.wl input[aria-invalid='true'] {
    border-color: #ff7d73;
}

.wl .btn {
    flex: 0 0 auto;
}

.wl .btn:disabled {
    cursor: progress;
}

/* Form yêu cầu demo: lưới 2 cột, nút và thông báo rộng hết hàng */
#demoForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 680px;
    text-align: left;
}

#demoForm input,
#demoForm select {
    width: 100%;
}

#demoForm .btn,
#demoForm .form-msg,
#demoForm .form-consent {
    grid-column: 1 / -1;
}

#demoForm .form-msg,
#demoForm .form-consent {
    text-align: center;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-consent {
    flex-basis: 100%;
    font-size: 0.82rem;
    color: rgba(238, 240, 238, 0.6);
}

.form-consent a {
    color: var(--paper);
    text-decoration-color: var(--orange);
    text-underline-offset: 3px;
}

.form-msg {
    flex-basis: 100%;
    font-family: var(--mono);
    font-size: 0.82rem;
}

.form-msg:empty {
    display: none;
}

.form-msg.error {
    color: #ff9a92;
}

.form-msg.ok {
    color: #5fe0a0;
}

.wl.done input,
.wl.done select,
.wl.done button {
    opacity: 0.4;
    pointer-events: none;
}

.cta-band-alt {
    margin-top: 22px;
    font-size: 0.95rem;
}

.cta-band-alt a {
    color: var(--paper);
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ---------- FAQ ---------- */
.faq-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
    align-items: start;
}

.faq {
    border-top: 3px solid var(--ink);
}

.faq details {
    border-bottom: 1px solid var(--line-2);
}

.faq summary {
    position: relative;
    padding: 20px 48px 20px 0;
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
}

.faq summary::after {
    right: 2px;
}

.faq summary:hover {
    color: var(--orange-d);
}

.faq details p {
    max-width: 40em;
    padding-bottom: 22px;
}

.faq a {
    color: var(--ink);
    text-decoration-color: var(--orange);
    text-underline-offset: 3px;
}

/* ---------- Footer ---------- */
.footer {
    padding: 60px 0 30px;
    border-top: 2px solid var(--ink);
    overflow: hidden;
}

.footer-mark {
    font-family: var(--display);
    font-size: clamp(7rem, 30vw, 24rem);
    font-weight: 700;
    line-height: 0.78;
    letter-spacing: 0.01em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(16, 22, 27, 0.14);
    user-select: none;
    /* Chữ trang trí tràn khỏi line box không được chặn liên kết phía trên. */
    pointer-events: none;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 2px solid var(--ink);
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px 40px;
    margin-bottom: 40px;
}

.footer-tag {
    max-width: 22em;
    margin: 14px 0 16px;
    color: var(--ink-2);
}

.footer-co {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-style: normal;
    color: var(--muted);
}

.footer-co > span:first-child {
    color: var(--ink);
    font-weight: 600;
}

.footer-co a,
.footer-col a {
    color: var(--ink-2);
    text-decoration: none;
}

.footer-co a:hover,
.footer-col a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--orange);
    text-underline-offset: 3px;
}

.footer-h {
    margin-bottom: 12px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.footer-col ul {
    list-style: none;
}

.footer-col li + li {
    margin-top: 8px;
}

.footer-col a {
    font-size: 0.95rem;
}

/* ---------- Reveal ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .flow {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .lot-wrap {
        justify-self: start;
    }

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

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

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        margin: 0;
        padding: 6px 32px 22px;
        background: rgba(238, 240, 238, 0.98);
        border-bottom: 2px solid var(--ink);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
    }

    .nav-menu.open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--line);
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-right {
        margin-left: auto;
    }

    .section {
        padding: 84px 0;
    }

    .sec-head {
        margin-bottom: 40px;
    }

    .hero {
        padding: calc(var(--nav-h) + 44px) 0 80px;
    }

    .pains {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 20px;
    }

    .nav-menu {
        padding: 6px 20px 22px;
    }

    .nav-cta {
        display: none;
    }

    .flow,
    .local {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .wl .btn {
        width: 100%;
    }

    .calc-form,
    .calc-out {
        padding: 22px 18px 18px;
    }

    .field-inline select {
        width: 130px;
    }

    .lot-wrap {
        max-width: none;
    }

    .stamp {
        font-size: 1.4rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   Trang phụ: đăng nhập, cổng khách hàng, pháp lý, 404
   ========================================================= */
.page-sub .nav {
    background: rgba(238, 240, 238, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: var(--line-2);
}

.page-sub main {
    padding: calc(var(--nav-h) + 56px) 0 96px;
    min-height: 70vh;
}

.auth-title {
    font-family: var(--display);
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.04;
    color: var(--ink);
}

.auth-sub {
    max-width: 36em;
    margin-top: 12px;
    font-size: 1.08rem;
}

/* ---------- Đăng nhập ---------- */
.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.auth-card {
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 rgba(16, 22, 27, 0.14);
}

.lot-tag-lock::before {
    content: '● ';
    color: var(--green);
}

.auth-body {
    padding: 28px 30px 26px;
}

.auth-body .sec-no {
    margin-bottom: 14px;
}

.auth-form {
    margin-top: 24px;
}

.auth-form label:not(.check) {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
}

.auth-form input[type='email'],
.auth-form input[type='password'],
.auth-form input[type='text'] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--line-2);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.auth-form input:hover {
    border-color: var(--ink-2);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(255, 90, 10, 0.35);
}

.auth-form input[aria-invalid='true'] {
    border-color: var(--red);
}

.pw-wrap {
    position: relative;
}

.pw-wrap input {
    padding-right: 72px !important;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 4px 8px;
    border: 0;
    background: none;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.pw-toggle:hover {
    color: var(--orange-d);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px;
    font-size: 0.95rem;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--ink);
    flex-shrink: 0;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.auth-err,
.auth-notice {
    margin: 0 0 16px;
    padding: 11px 14px;
    font-size: 0.95rem;
    color: var(--ink);
}

.auth-err {
    border-left: 4px solid var(--red);
    background: rgba(212, 47, 38, 0.08);
}

.auth-notice {
    margin-top: 20px;
    border-left: 4px solid var(--green);
    background: rgba(15, 157, 88, 0.08);
}

.auth-legal {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-2);
    font-size: 0.86rem;
    color: var(--muted);
}

.auth-legal a,
.auth-help a,
.legal a {
    color: var(--ink);
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.auth-side {
    padding-top: 12px;
}

.auth-help {
    padding: 18px 0;
    border-top: 3px solid var(--ink);
}

.auth-help + .auth-help {
    margin-top: 12px;
}

.auth-help h2 {
    margin-bottom: 6px;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
}

.auth-secure {
    margin-top: 20px;
    padding: 14px 16px;
    border-left: 6px solid var(--orange);
    background: var(--white);
    font-size: 0.95rem;
    color: var(--ink);
}

/* ---------- Cổng khách hàng ---------- */
.admin-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.admin-search .field {
    flex: 1 1 280px;
    min-width: 0;
    margin: 0;
}

.admin-search input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--line-2);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font: 1rem var(--sans);
}

.admin-status {
    margin: 16px 0 0;
}

.admin-table-wrap {
    max-width: 100%;
}

.admin-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-weight: 600;
    background: var(--paper);
}

.admin-table td {
    overflow-wrap: anywhere;
    max-width: 260px;
}

.admin-table tbody tr:hover {
    background: var(--paper);
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 36px;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 rgba(16, 22, 27, 0.1);
}

.panel-body {
    margin-top: 0;
    padding: 22px 24px 24px;
}

.kv > div {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
}

.kv > div:last-child {
    border-bottom: 0;
}

.kv dt {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 3px;
}

.kv dd {
    font-weight: 500;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.field-hint {
    margin: -4px 0 16px;
    font-size: 0.88rem;
    color: var(--muted);
}

.form-note {
    margin-bottom: 16px;
    padding: 10px 12px;
    font-size: 0.92rem;
    color: var(--ink);
}

.form-note.ok {
    border-left: 4px solid var(--green);
    background: rgba(15, 157, 88, 0.08);
}

.form-note.error {
    border-left: 4px solid var(--red);
    background: rgba(212, 47, 38, 0.08);
}

.portal-h {
    margin: 56px 0 18px;
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    list-style: none;
}

.tile {
    display: block;
    height: 100%;
    padding: 20px 22px 22px;
    background: var(--white);
    border: 2px solid var(--line-2);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease);
}

.tile:hover {
    border-color: var(--ink);
    box-shadow: 6px 6px 0 var(--orange);
    transform: translate(-2px, -2px);
}

.tile-no {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange-d);
}

.tile h3 {
    margin: 6px 0 8px;
}

.tile p {
    font-size: 0.95rem;
}

/* ---------- Pháp lý ---------- */
.page-head {
    padding-bottom: 28px;
    border-bottom: 2px solid var(--ink);
}

.page-meta {
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
}

.legal-tabs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    list-style: none;
}

.legal-tabs a {
    display: inline-block;
    padding: 6px 12px;
    border: 2px solid var(--line-2);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
}

.legal-tabs a:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.legal-tabs a[aria-current='page'] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.legal-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
    margin-top: 40px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    padding-top: 14px;
    border-top: 3px solid var(--ink);
}

.legal-toc-h {
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.legal-toc ol {
    list-style: decimal-leading-zero;
    padding-left: 2.2em;
    font-size: 0.92rem;
}

.legal-toc li {
    padding: 4px 0;
}

.legal-toc li::marker {
    font-family: var(--mono);
    font-size: 0.8em;
    color: var(--orange-d);
}

.legal-toc a {
    color: var(--ink-2);
    text-decoration: none;
}

.legal-toc a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--orange);
}

.legal {
    max-width: 48em;
}

.legal section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.legal section:last-child {
    border-bottom: 0;
}

.legal h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
}

.legal h2 .mono {
    padding: 1px 7px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.8rem;
    font-weight: 500;
}

.legal p + p,
.legal p + ul,
.legal ul + p,
.legal .table-wrap + p {
    margin-top: 12px;
}

.legal ul {
    padding-left: 1.3em;
}

.legal li + li {
    margin-top: 6px;
}

.legal li::marker {
    color: var(--orange-d);
}

.legal strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-contact {
    list-style: none;
    padding: 14px 18px !important;
    margin: 12px 0;
    border-left: 6px solid var(--orange);
    background: var(--white);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.legal-contact li:first-child {
    font-weight: 600;
    color: var(--ink);
}

.legal .table-wrap {
    margin-top: 16px;
    border: 2px solid var(--ink);
    background: var(--white);
}

.legal-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.legal-table th {
    padding: 10px 12px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.legal-table td {
    padding: 11px 12px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

.legal-table td.mono {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

/* ---------- 404 ---------- */
.nf-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: center;
}

.nf-code {
    font-size: clamp(6rem, 18vw, 12rem);
    font-weight: 600;
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
}

.nf-stamp {
    display: inline-block;
    margin-bottom: 18px;
    border-color: var(--red);
    color: var(--red);
}

/* ---------- Responsive cho phần mới ---------- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-grid,
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .auth-grid {
        max-width: 560px;
    }

    .legal-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .legal-toc {
        position: static;
    }

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

@media (max-width: 860px) {
    .nav-menu-login {
        display: list-item;
    }

    .page-sub main {
        padding-top: calc(var(--nav-h) + 36px);
    }
}

@media (max-width: 560px) {
    .nav-login {
        display: none;
    }

    #demoForm {
        grid-template-columns: 1fr;
    }

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

    .auth-body,
    .panel-body {
        padding: 22px 18px 20px;
    }

    .kv > div {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 10px 18px;
    }

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

    .nf-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .portal-actions,
    .portal-actions .btn {
        width: 100%;
    }
}
