﻿/* =============================================
       DESIGN TOKENS & RESET
    ============================================= */
    :root {
      --bg:        #FFFAFA;
      --surface:   #ffffff;
      --blue-deep: #1a3c8f;
      --blue-mid:  #2563eb;
      --blue-lite: #3b82f6;
      --blue-pale: #dbeafe;
      --blue-xpale:#eff6ff;
      --accent:    #0ea5e9;
      --green:     #16a34a;
      --green-bg:  #dcfce7;
      --red:       #dc2626;
      --red-bg:    #fee2e2;
      --gold:      #d97706;
      --text:      #0f172a;
      --muted:     #64748b;
      --border:    #cbd5e1;
      --shadow-sm: 0 1px 3px rgba(37,99,235,.08), 0 1px 2px rgba(0,0,0,.06);
      --shadow-md: 0 4px 16px rgba(37,99,235,.12), 0 2px 6px rgba(0,0,0,.06);
      --shadow-lg: 0 12px 40px rgba(37,99,235,.18), 0 4px 12px rgba(0,0,0,.08);
      --radius:    16px;
      --radius-sm: 10px;

      /* Banner: đổi --banner-bg-size thành cover | contain | 100% auto | 110% | ... */
      --banner-bg-image: url('./background_new.jpg');
      --banner-bg-size: contain;
      --banner-bg-position: center top;
      --banner-aspect-ratio: 3344 / 1882;
    }

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

    body {
      font-family: 'Times New Roman', Times, serif;
      min-height: 100vh;
      background: var(--bg);
    }

    /* Hiệu ứng pháo giấy tung bay */
    #confetti-layer {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 9999;
      overflow: hidden;
    }

    .confetti-piece {
      position: absolute;
      top: -18px;
      left: var(--confetti-left);
      width: var(--confetti-width);
      height: var(--confetti-height);
      border-radius: 2px;
      background: var(--confetti-color);
      opacity: .9;
      transform: rotate(0deg);
      animation: confetti-fall var(--confetti-duration) linear infinite;
      animation-delay: var(--confetti-delay);
      will-change: transform, opacity;
    }

    .confetti-piece:nth-child(3n) {
      border-radius: 50%;
    }

    .confetti-piece:nth-child(4n) {
      width: calc(var(--confetti-width) * 1.8);
      height: 3px;
      border-radius: 999px;
    }

    @keyframes confetti-fall {
      0% {
        opacity: 0;
        transform: translate3d(0, -18px, 0) rotate(0deg);
      }
      10% {
        opacity: .95;
      }
      50% {
        transform: translate3d(calc(var(--confetti-drift) * .45), 50vh, 0) rotate(calc(var(--confetti-rotation) * .55));
      }
      100% {
        opacity: 0;
        transform: translate3d(var(--confetti-drift), 105vh, 0) rotate(var(--confetti-rotation));
      }
    }

    @media (prefers-reduced-motion: reduce) {
      #confetti-layer { display: none; }
    }

    /* Banner background-image + form đè lên */
    .banner-block {
      display: grid;
      width: 100%;
      background: #0d2461;
    }

    .banner-bg,
    .banner-overlay {
      grid-area: 1 / 1;
    }

    .banner-bg {
      width: 100%;
      aspect-ratio: var(--banner-aspect-ratio);
      background-image: var(--banner-bg-image);
      background-size: var(--banner-bg-size);
      background-position: var(--banner-bg-position);
      background-repeat: no-repeat;
      background-color: #0d2461;
      z-index: 0;
      align-self: start;
      pointer-events: none;
    }

    .banner-overlay {
      z-index: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: clamp(8px, 1.8vw, 18px) 12px 10px;
      line-height: normal;
    }

    .banner-overlay header {
      width: 100%;
      max-width: 700px;
      text-align: center;
      padding: 0 0 9px;
    }

    .banner-overlay header h1 {
      color: #ffffff;
      font-size: clamp(1.75rem, 4.5vw, 2.65rem);
      text-shadow: 0 2px 10px rgba(0, 35, 90, .55), 0 1px 3px rgba(0, 0, 0, .35);
    }

    .banner-overlay header h1 span {
      color: #ffea00;
      background: none;
      -webkit-text-fill-color: #ffea00;
      -webkit-background-clip: border-box;
      background-clip: border-box;
      text-shadow:
        0 0 18px rgba(255, 234, 0, .45),
        0 2px 6px rgba(0, 0, 0, .55);
    }

    .banner-overlay header p {
      color: #fffbeb;
      font-size: clamp(.9rem, 2.1vw, 1.04rem);
      font-weight: 600;
      letter-spacing: .2px;
      margin-top: 5px;
      text-shadow: 0 1px 5px rgba(0, 30, 80, .65), 0 2px 12px rgba(0, 0, 0, .3);
    }

    .banner-overlay .tabs-wrapper,
    .banner-overlay .container {
      width: 100%;
      max-width: 720px;
    }

    .banner-overlay .tabs-wrapper {
      padding: 0 0 8px;
    }

    .banner-overlay .tab-btn {
      font-size: .88rem;
      font-weight: 700;
    }

    .banner-overlay .formula-hint {
      padding: 14px 15px;
      margin-bottom: 14px;
      font-size: .87rem;
      line-height: 1.5;
      color: #0c2d6e;
      font-weight: 500;
    }

    .banner-overlay .formula-hint strong {
      font-weight: 800;
      color: #082a66;
    }

    .banner-overlay .card {
      padding: 26px 20px;
      margin-bottom: 0;
    }

    .banner-overlay .card-title {
      margin-bottom: 18px;
    }

    .banner-overlay .card-title .icon-wrap {
      width: 38px;
      height: 38px;
      font-size: 1.05rem;
    }

    .banner-overlay .card-title h2 {
      font-size: 1.1rem;
      font-weight: 800;
      color: #0c2d6e;
    }

    .banner-overlay .card-title p {
      font-size: .82rem;
      font-weight: 500;
      color: #334155;
    }

    .banner-overlay .field {
      margin-bottom: 13px;
    }

    .banner-overlay .field label {
      font-size: .9rem;
      font-weight: 700;
      color: #0c2d6e;
      margin-bottom: 6px;
    }

    .banner-overlay .field input {
      padding: 14px 14px;
      font-size: 1.02rem;
      font-weight: 700;
      color: #0f172a;
    }

    .banner-overlay .field input::placeholder {
      color: #94a3b8;
      font-weight: 500;
    }

    .banner-overlay .badge-optional {
      font-size: .68rem;
      font-weight: 600;
      color: #475569;
    }

    .banner-overlay .btn-calc {
      padding: 16px;
      font-size: 1.02rem;
      font-weight: 800;
      margin-top: 4px;
    }

    .banner-overlay .btn-reset {
      padding: 13px;
      font-size: .9rem;
      font-weight: 700;
      margin-top: 8px;
    }

    .banner-overlay .container:has(#panel-tn.active) {
      max-width: 705px;
    }

    .banner-overlay #panel-tn .formula-hint {
      padding: 11px 12px;
      margin-bottom: 10px;
      font-size: .78rem;
      line-height: 1.38;
    }

    .banner-overlay #panel-tn .card {
      padding: 18px 15px;
    }

    .banner-overlay #panel-tn .card-title {
      margin-bottom: 11px;
      gap: 8px;
    }

    .banner-overlay #panel-tn .card-title .icon-wrap {
      width: 30px;
      height: 30px;
      font-size: .85rem;
    }

    .banner-overlay #panel-tn .card-title h2 {
      font-size: 1.02rem;
    }

    .banner-overlay #panel-tn .card-title p {
      font-size: .76rem;
    }

    #panel-tn .field-group-label {
      font-size: .68rem;
      font-weight: 800;
      color: #1d4ed8;
      margin-bottom: 6px;
    }

    #panel-tn .field-group-label.spaced {
      margin-top: 6px;
    }

    #panel-tn .fields-grid {
      gap: 0 8px;
    }

    #panel-tn .field {
      margin-bottom: 7px;
    }

    .banner-overlay #panel-tn .field label {
      font-size: .8rem;
      margin-bottom: 3px;
    }

    .banner-overlay #panel-tn .field input {
      padding: 11px 11px;
      font-size: .94rem;
    }

    .banner-overlay #panel-tn .badge-optional {
      font-size: .58rem;
    }

    .banner-overlay #panel-tn .btn-calc {
      padding: 13px;
      font-size: .94rem;
      margin-top: 2px;
    }

    .banner-overlay #panel-tn .btn-reset {
      padding: 10px;
      font-size: .8rem;
      margin-top: 4px;
    }

    /* Kết quả gọn — tránh tràn ra nền trắng dưới banner */
    .banner-overlay .result-card {
      margin-top: 8px;
      border-radius: 12px;
      box-shadow: var(--shadow-md);
    }

    .banner-overlay .result-header {
      padding: 10px 14px 8px;
    }

    .banner-overlay .result-header h3 {
      font-size: .68rem;
      letter-spacing: 1px;
      margin-bottom: 3px;
    }

    .banner-overlay .result-score-big {
      font-size: 2.15rem;
      letter-spacing: -1px;
    }

    .banner-overlay .result-score-label {
      font-size: .68rem;
      padding-bottom: 4px;
    }

    .banner-overlay .result-body {
      padding: 11px 13px;
    }

    .banner-overlay .result-card .sub-scores {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 5px;
      margin-bottom: 6px;
    }

    .banner-overlay .sub-score-item {
      min-width: 0;
      padding: 6px 4px;
    }

    .banner-overlay .sub-score-item .sub-val {
      font-size: 1.08rem;
    }

    .banner-overlay .sub-score-item .sub-lbl {
      font-size: .56rem;
      letter-spacing: 0;
      line-height: 1.2;
    }

    .banner-overlay #tn-mon-detail {
      margin-top: 0 !important;
    }

    .banner-overlay .conclusion {
      padding: 9px 11px;
      gap: 8px;
      font-size: .8rem;
    }

    .banner-overlay .conclusion .con-icon {
      font-size: 1.1rem;
    }

    .banner-overlay .conclusion .con-text small {
      font-size: .64rem;
      margin-top: 1px;
    }



    /* =============================================
       HEADER
    ============================================= */
    .site-header {
      width: 100%;
      background: rgba(255,255,255,.82);
      border-bottom: 1px solid rgba(203,213,225,.72);
      backdrop-filter: blur(14px);
      box-shadow: var(--shadow-sm);
      animation: slideDown .5s ease both;
    }

    .site-header-inner {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      padding: 12px clamp(20px, 5vw, 56px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
    }

    .site-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      flex: 0 1 auto;
      margin-right: auto;
    }

    .site-logo {
      width: 58px;
      height: 58px;
      object-fit: contain;
      display: block;
      flex-shrink: 0;
    }

    .site-title {
      font-family: 'Times New Roman', Times, serif;
      color: var(--blue-deep);
      font-size: 1.08rem;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: .2px;
      text-align: left;
    }

    .site-subtitle {
      display: block;
      color: var(--muted);
      font-family: 'Times New Roman', Times, serif;
      font-size: .86rem;
      font-weight: 700;
      margin-top: 3px;
    }

    .site-nav {
      flex: 0 0 auto;
      margin-left: auto;
    }

    .site-nav-list {
      list-style: none;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 2px 4px;
    }

    .site-nav-list a {
      display: block;
      padding: 8px 10px;
      font-family: Arial, Helvetica, sans-serif;
      font-size: .88rem;
      font-weight: 700;
      color: #1a3c8f;
      text-decoration: none;
      letter-spacing: .1px;
      transition: color .2s, background .2s;
    }

    .site-nav-list a:hover {
      color: var(--blue-mid);
      background: var(--blue-xpale);
    }

    @media (max-width: 900px) {
      .site-header-inner {
        align-items: flex-start;
      }

      .site-brand {
        margin-right: 0;
      }

      .site-nav {
        width: 100%;
        margin-left: 0;
      }

      .site-nav-list {
        justify-content: flex-start;
      }
    }

    @media (max-width: 680px) {
      .site-nav-list a {
        padding: 8px 10px;
        font-size: .78rem;
      }
    }

    header {
      text-align: center;
      padding: 0 0 20px;
      animation: slideDown .6s ease both;
    }

    header h1 {
      font-family: 'Times New Roman', Times, serif;
      font-size: clamp(1.8rem, 5.5vw, 3rem);
      font-weight: 800;
      color: #0c2d6e;
      line-height: 1.15;
      letter-spacing: -1px;
    }

    header h1 span {
      background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #eab308 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    header p {
      color: #1e3a5f;
      margin-top: 10px;
      font-size: .9rem;
      font-weight: 500;
    }

    .promo-float {
      position: fixed;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 50;
      width: min(200px, 15vw);
      filter: drop-shadow(0 12px 24px rgba(15,23,42,.22));
    }

    .promo-float a {
      display: block;
    }

    .promo-float img {
      width: 100%;
      height: auto;
      display: block;
    }

    .promo-fallback {
      display: none;
      align-items: center;
      justify-content: center;
      min-height: 86px;
      padding: 14px 18px;
      border-radius: 14px;
      background: linear-gradient(135deg, #0b5fd7, #0340a2);
      color: #ffd21e;
      font-weight: 900;
      text-align: center;
      text-transform: uppercase;
      line-height: 1.2;
      border: 2px solid rgba(255,255,255,.9);
    }

    .promo-missing .promo-fallback {
      display: flex;
    }

    .promo-close {
      position: absolute;
      top: -9px;
      right: -7px;
      width: 26px;
      height: 26px;
      border: 1px solid rgba(15,23,42,.16);
      border-radius: 50%;
      background: #ffffff;
      color: var(--blue-deep);
      font-size: 1.05rem;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
      z-index: 2;
    }

    .promo-close:hover {
      color: var(--red);
      transform: scale(1.04);
    }

    /* =============================================
       TABS
    ============================================= */
    .tabs-wrapper {
      display: flex;
      justify-content: center;
      padding: 0 0 20px;
      animation: slideDown .6s .1s ease both;
    }

    .tabs {
      display: flex;
      background: var(--surface);
      border-radius: 50px;
      padding: 5px;
      gap: 4px;
      box-shadow: var(--shadow-sm);
      border: 1px solid var(--border);
    }

    /* Tab button */
    .tab-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 11px 22px;
      border-radius: 40px;
      border: none;
      background: transparent;
      color: var(--muted);
      font-family: 'Times New Roman', Times, serif;
      font-size: .85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all .25s;
      white-space: nowrap;
    }

    .tab-btn .tab-icon {
      font-size: 1rem;
      transition: transform .3s;
    }

    .tab-btn:hover { color: var(--blue-mid); }
    .tab-btn:hover .tab-icon { transform: scale(1.2); }

    /* Active tab gets a pill background */
    .tab-btn.active {
      background: linear-gradient(135deg, var(--blue-mid), var(--blue-lite));
      color: #fff;
      box-shadow: 0 4px 14px rgba(37,99,235,.35);
    }

    .tab-btn.active .tab-icon { transform: scale(1.1); }

    /* =============================================
       PANELS
    ============================================= */
    .container {
      width: 100%;
      padding: 0;
    }

    .panel { display: none; }
    .panel.active {
      display: block;
      animation: fadeUp .45s ease both;
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-16px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* =============================================
       CARD
    ============================================= */
    .card {
      background: var(--surface);
      border-radius: var(--radius);
      padding: 30px 26px;
      box-shadow: var(--shadow-md);
      border: 1px solid rgba(203,213,225,.6);
      margin-bottom: 16px;
    }

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

    .card-title .icon-wrap {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: var(--blue-pale);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      flex-shrink: 0;
    }

    .card-title h2 {
      font-family: 'Times New Roman', Times, serif;
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--blue-deep);
    }

    .card-title p {
      font-size: .75rem;
      color: var(--muted);
      font-weight: 400;
      margin-top: 1px;
    }

    /* =============================================
       FORM FIELDS
    ============================================= */
    .field {
      margin-bottom: 16px;
    }

    .field label {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: .85rem;
      font-weight: 600;
      color: var(--blue-deep);
      margin-bottom: 8px;
      letter-spacing: .2px;
    }

    .field label .lbl-icon {
      font-size: .95rem;
    }

    /* Optional badge */
    .badge-optional {
      margin-left: auto;
      font-size: .65rem;
      font-weight: 500;
      color: var(--muted);
      background: var(--bg);
      border: 1px solid var(--border);
      padding: 1px 7px;
      border-radius: 20px;
    }

    .field input {
      width: 100%;
      padding: 14px 16px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius-sm);
      font-family: 'Times New Roman', Times, serif;
      font-size: 1rem;
      font-weight: 600;
      color: var(--text);
      background: var(--bg);
      transition: border-color .2s, box-shadow .2s, background .2s;
      outline: none;
      -moz-appearance: textfield;
    }
    .field input::-webkit-inner-spin-button,
    .field input::-webkit-outer-spin-button { -webkit-appearance: none; }

    .field input::placeholder { color: #b0bec5; font-weight: 400; }

    .field input:focus {
      border-color: var(--blue-mid);
      background: #fff;
      box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }

    /* Validation states */
    .field input.invalid {
      border-color: var(--red);
      background: #fff5f5;
      box-shadow: 0 0 0 3px rgba(220,38,38,.1);
    }
    .field input.valid {
      border-color: var(--green);
    }

    /* Error message per field */
    .field-error {
      display: none;
      font-size: .72rem;
      color: var(--red);
      font-weight: 500;
      margin-top: 5px;
      padding-left: 4px;
    }
    .field-error.show { display: block; }

    /* Two-column grid for form on wider screens */
    .fields-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 14px;
    }
    .fields-grid .field-full { grid-column: 1 / -1; }

    .field-group-label {
      font-size: .74rem;
      font-weight: 700;
      color: var(--blue-mid);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 10px;
    }

    .field-group-label + .fields-grid {
      margin-bottom: 4px;
    }

    .field-group-label.spaced {
      margin-top: 14px;
    }

    @media (max-width: 480px) {
      .fields-grid { grid-template-columns: 1fr; }
      .fields-grid .field-full { grid-column: 1; }
    }

    /* =============================================
       FORMULA HINT
    ============================================= */
    .formula-hint {
      background: var(--blue-xpale);
      border: 1px solid var(--blue-pale);
      border-radius: var(--radius-sm);
      padding: 14px 18px;
      margin-bottom: 18px;
      font-size: .8rem;
      color: var(--blue-deep);
      line-height: 1.65;
    }
    .formula-hint strong { font-weight: 700; }

    /* =============================================
       BUTTON
    ============================================= */
    .btn-calc {
      width: 100%;
      padding: 16px;
      background: linear-gradient(135deg, var(--blue-mid) 0%, var(--accent) 100%);
      border: none;
      border-radius: var(--radius-sm);
      color: #fff;
      font-family: 'Times New Roman', Times, serif;
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: .3px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 18px rgba(37,99,235,.3);
      margin-top: 6px;
    }
    .btn-calc:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 28px rgba(37,99,235,.4);
    }
    .btn-calc:active { transform: translateY(0); }

    .btn-reset {
      width: 100%;
      padding: 12px;
      background: transparent;
      border: 1.5px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--muted);
      font-family: 'Times New Roman', Times, serif;
      font-size: .86rem;
      font-weight: 600;
      cursor: pointer;
      margin-top: 10px;
      transition: border-color .2s, color .2s;
    }
    .btn-reset:hover { border-color: var(--blue-lite); color: var(--blue-mid); }

    /* =============================================
       RESULT CARD
    ============================================= */
    .result-card {
      display: none;
      margin-top: 16px;
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      animation: fadeUp .4s ease both;
    }
    .result-card.show { display: block; }

    .result-header {
      padding: 20px 24px 16px;
      background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
      color: #fff;
    }

    .result-header h3 {
      font-family: 'Times New Roman', Times, serif;
      font-size: .8rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      opacity: .75;
      margin-bottom: 6px;
    }

    .result-score-row {
      display: flex;
      align-items: flex-end;
      gap: 10px;
    }

    .result-score-big {
      font-family: 'Times New Roman', Times, serif;
      font-size: 3.2rem;
      font-weight: 800;
      line-height: 1;
      letter-spacing: -2px;
    }

    .result-score-label {
      font-size: .78rem;
      opacity: .7;
      padding-bottom: 6px;
      font-weight: 400;
    }

    .result-body {
      background: var(--surface);
      padding: 20px 24px;
    }

    /* Sub-scores row */
    .sub-scores {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .sub-score-item {
      flex: 1;
      min-width: 110px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 12px;
      text-align: center;
    }

    .sub-score-item .sub-val {
      font-family: 'Times New Roman', Times, serif;
      font-size: 1.5rem;
      font-weight: 800;
      color: var(--blue-mid);
    }

    .sub-score-item .sub-lbl {
      font-size: .68rem;
      color: var(--muted);
      font-weight: 500;
      margin-top: 2px;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    /* Conclusion badge */
    .conclusion {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--radius-sm);
      font-size: .88rem;
      font-weight: 600;
    }

    .conclusion .con-icon { font-size: 1.4rem; }

    .conclusion.pass {
      background: var(--green-bg);
      border: 1px solid rgba(22,163,74,.25);
      color: var(--green);
    }
    .conclusion.fail {
      background: var(--red-bg);
      border: 1px solid rgba(220,38,38,.2);
      color: var(--red);
    }
    .conclusion.warn {
      background: #fef3c7;
      border: 1px solid rgba(217,119,6,.25);
      color: var(--gold);
    }

    .conclusion .con-text small {
      display: block;
      font-size: .72rem;
      font-weight: 400;
      opacity: .75;
      margin-top: 2px;
    }

    /* Global error banner */
    .error-banner {
      display: none;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      border-radius: var(--radius-sm);
      background: var(--red-bg);
      border: 1px solid rgba(220,38,38,.2);
      color: var(--red);
      font-size: .82rem;
      font-weight: 600;
      margin-bottom: 12px;
    }
    .error-banner.show { display: flex; }

    /* =============================================
       RESPONSIVE TWEAKS
    ============================================= */
    @media (max-width: 480px) {
      .card { padding: 20px 16px; }
      .site-header-inner { padding: 10px 16px; }
      .site-logo { width: 48px; height: 48px; }
      .site-title { font-size: .9rem; }
      .site-subtitle { font-size: .76rem; }
      header { padding: 30px 16px 24px; }
      .promo-float {
        width: 130px;
        right: 8px;
        top: auto;
        bottom: 14px;
        transform: none;
      }
      .tabs { flex-wrap: wrap; }
      .tab-btn { padding: 9px 14px; font-size: .78rem; }
      .result-score-big { font-size: 2.4rem; }
    }

/* =============================================
   FOOTER STYLES
============================================= */
footer {
    background: #0d2461;
    background-image:
      radial-gradient(ellipse at 15% 50%, rgba(255,255,255,.04) 0%, transparent 55%),
      url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #c8d8f0;
    margin-top: 0;
  }

  .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
  }

  .footer-left {
    max-width: 680px;
    text-align: left;
  }

  /* --- Logo --- */
  .footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
    opacity: .95;
  }

  .footer-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
  }

  /* --- Tên trường --- */
  .footer-school-name {
    font-family: 'Times New Roman', Times, serif;
    font-size: .9rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: .3px;
    margin-bottom: 16px;
  }

  .footer-school-name span {
    font-size: .75rem !important;
  }

  /* --- Danh sách liên hệ --- */
  .footer-contacts {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .footer-contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .76rem;
    line-height: 1.45;
    color: #b0c4e0;
  }

  .footer-contacts li strong {
    color: #ffffff;
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .4px;
  }

  .fc-icon {
    font-size: .92rem;
    margin-top: 2px;
    flex-shrink: 0;
    /* circle background giống ảnh */
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-social {
    min-width: 340px;
    max-width: 380px;
    text-align: left;
  }

  .footer-social h3 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .social-links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: nowrap;
  }

  .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    text-decoration: none;
    transition: transform .2s, filter .2s;
  }

  .social-link img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
  }

  .social-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
  }

  .footer-map {
    width: 100%;
    height: 220px;
    margin-top: 18px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
  }

  .footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }

  /* --- Copyright bar --- */
  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    padding: 12px 20px;
    font-size: .72rem;
    color: rgba(180,200,230,.65);
    letter-spacing: .2px;
  }

  .footer-bottom a {
    color: rgba(180,200,230,.8);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
  }

  .footer-bottom a:hover { color: #fff; }

  .tabs-wrapper,
  .tabs-wrapper *,
  .container,
  .container *,
  footer,
  footer * {
    font-family: Aptos, "Aptos Body", Calibri, Arial, sans-serif !important;
  }

  .tab-btn {
    font-size: .92rem;
    font-weight: 700;
  }

  .formula-hint,
  .field label,
  .btn-reset,
  .result-score-label,
  .footer-contacts li,
  .footer-bottom {
    font-size: .86rem;
  }

  .field input,
  .btn-calc {
    font-size: 1.02rem;
  }

  .card-title h2,
  .footer-school-name,
  .footer-social h3 {
    font-size: 1.15rem;
  }

  .card-title p,
  .field-error,
  .badge-optional,
  .sub-score-item .sub-lbl {
    font-size: .78rem;
  }

  /* Responsive */
  @media (max-width: 680px) {
    .footer-inner {
      flex-direction: column;
      gap: 24px;
      padding: 24px 20px 20px;
    }
    .footer-social { min-width: 0; width: 100%; }
    .social-links { gap: 12px; }
    .footer-social h3 { font-size: 1.08rem; }
    .footer-map { height: 230px; }
    .footer-school-name { font-size: .82rem; }
  }
