/* Ô nhập tiền dùng chung: chọn đơn vị bằng nút tròn, đánh dấu bắt buộc, form 2 cột */
.mi-help{display:flex;align-items:center;flex-wrap:wrap;gap:2px 12px;margin:2px 0 4px;font-size:12px;line-height:1.3}
.mi-help[hidden]{display:none}
.mi-seg{display:inline-flex;gap:10px}
.mi-seg button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:var(--muted,var(--page-muted,#5b6779));font:inherit;font-size:12.5px;font-weight:600;padding:2px 0;min-height:24px;cursor:pointer}
.mi-seg button::before{content:"";box-sizing:border-box;width:14px;height:14px;border-radius:50%;border:1.5px solid var(--muted,#8a96a8);background:#fff;flex:0 0 auto}
.mi-seg button[aria-pressed=true]{color:var(--ink,var(--page-ink,#13213a))}
.mi-seg button[aria-pressed=true]::before{border-color:var(--brand,#1f6feb);background:radial-gradient(circle,var(--brand,#1f6feb) 0 4px,#fff 4.5px)}
.mi-eq{font-size:12.5px;font-weight:600;color:var(--brand,#1f6feb)}
.req-star{color:#d33;font-weight:700;margin-left:2px}
.mi-req{display:block;color:#d33;font-size:12px;margin:2px 0 4px}
.mi-req[hidden]{display:none}
.save-row[hidden]{display:none!important}
/* Khung nhập luôn mở: không còn mũi tên đóng/mở, bỏ nút Tiếp, bỏ khung Nhập nhanh trùng lặp */
details.always-open>summary{cursor:default}
details.always-open>summary::after{display:none!important}
details.always-open>summary::-webkit-details-marker{display:none}
.p1-block .p1-next,.p1-next{display:none!important}
#quickCard,#quickToggle{display:none!important}
.req-star,.mi-req{display:none!important}
/* Chữ ghi chú dưới ô nhập nhỏ lại */
.hint,.field .cap,.sublabel+.hint{font-size:.6875rem!important;line-height:1.35!important;margin-top:2px!important}
.tool-field .field-echo,.tool-field .resolve-amount,.input-card .model-note,.input-sub,.reference-fee-note,.save-hint,#inputStatus,#draftStatus{font-size:.6875rem!important;line-height:1.4!important}
.mi-seg button,.mi-eq{font-size:12px}

/* ===== Đợt 4: mở hết, 2 cột đồng bộ, chữ thường, ô thấp, thanh trượt ===== */
/* Cột nhập liệu không còn khung cuộn riêng: thấy hết từ trên xuống */
body .tool-wrap .input-card,body .analyze>.pane-left,.pane-left{position:static!important;max-height:none!important;overflow:visible!important}
/* Chữ và số trong ô nhập: cỡ thường, không đậm */
body :is(input,select):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]),body textarea{font-size:14px!important;font-weight:400!important;line-height:1.3!important}
.money-value-display{font-size:14px!important;font-weight:400!important}
.money-value-display small,.number-unit,.smart-money-unit{font-size:12px!important;font-weight:400!important}
/* Chiều cao ô nhập thấp, bằng nhau */
.inp,.number-entry{height:28px!important;min-height:28px!important;box-sizing:border-box}
.inp input:not([type=range]):not([type=checkbox]):not([type=radio]),.inp select,.number-entry input[type=text]{height:100%!important;min-height:0!important;padding-top:0!important;padding-bottom:0!important}
.field>input:not([type=range]):not([type=checkbox]):not([type=radio]),.field>select,.tool-field>select,.tool-field>input:not([type=range]):not([type=checkbox]){height:28px!important;min-height:28px!important;padding-top:0!important;padding-bottom:0!important}
.field>label,.tool-field>label{line-height:1.3;display:block}
/* Form 2 cột trong toàn bộ phần mềm: ô nằm cùng hàng, nhãn cao bằng nhau (always-open.js căn) */
body .fields,.p1-block>div{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px;align-items:start}
body .fields>.row2{display:contents!important}
.fields>*:not(.field):not(.row2),.p1-block>div>*:not(.tool-field),.p1-block>div>.rate-field,.p1-block>div>.tool-field:has(select){grid-column:1/-1}
.fields .field,.p1-block .tool-field{margin:0!important;min-width:0}
.fields .field:has(textarea),.fields .field:has(input[type=text]:not([inputmode])){grid-column:1/-1}
.input-card,.pane-left{container-type:inline-size}
@container (max-width:250px){body .fields,.p1-block>div{grid-template-columns:minmax(0,1fr)!important}}
/* Thanh trượt số năm vay giống thanh trượt lãi suất */
.years-slider{margin-top:6px}
.years-slider input[type=range]{width:100%;min-height:26px;height:26px;padding:0;border:0;background:transparent;accent-color:#2861ed;cursor:pointer;margin:0}
.years-field .number-entry{max-width:100%}
.year-options{display:none!important}
.p1-block #fields>.tool-field:not(.rate-field)>label,.p1-block>div>.tool-field>label{min-height:0}
.p1-block{padding-bottom:14px!important}
.fields .field:has(.toggle),.fields .field:has(.seg),.fields .field:has(.chips){grid-column:1/-1}

/* Thanh trượt: bong bóng số chạy theo ngón kéo; không còn ô nhập số năm */
.ys-src{display:none!important}
.ys-field .field-echo,.ys-field .resolve-amount{display:none}
.ys-wrap,.rate-suggestions{position:relative}
input.rs-range{margin:0!important;width:100%}
.rs-bubble{position:absolute;transform:translateX(-50%);padding:1px 7px;border-radius:7px;background:#173a8c;color:#fff;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;pointer-events:none;z-index:2;opacity:0;transition:opacity .12s}
.rs-bubble.on{opacity:1}
.rs-bubble::after{content:"";position:absolute;left:50%;bottom:-4px;transform:translateX(-50%) rotate(45deg);width:7px;height:7px;background:inherit}
#rateValue,#yearsValue{display:none!important}
.rate-scale{justify-content:space-between}
.rate-suggestions .term-chips,.reference-fee-note button{display:none!important}
/* Bỏ mũi tên đóng/mở và số thứ tự đầu mục */
details.p1-block>summary,details.group>summary{list-style:none}
details.p1-block>summary::marker,details.group>summary::marker{content:""}
details.p1-block>summary::-webkit-details-marker{display:none}
.p1-block>div>.ys-field,body .fields>.ys-field,body .fields>.row2>.ys-field{grid-column:1/-1}
.ys-field .rate-scale{margin-top:2px;font-size:12px}
.ys-wrap{margin-top:0}
.rate-scale{display:flex!important;align-items:center;justify-content:space-between}
.rs-val{font-size:13px;font-weight:700;color:var(--ink,#13213a)}

/* ===== Nhịp dãn cách thống nhất toàn phần mềm ===== */
/* ô lãi suất thừa khi đã có thanh trượt */
.rate-field>.number-entry,.rate-field>.field-echo,.rate-field>.resolve-amount{display:none!important}
/* nhãn - ô nhập - ghi chú: cùng khoảng cách ở mọi trang */
.field>label,.tool-field>label{font-size:13px!important;line-height:1.3!important;margin:0 0 4px!important;padding:0}
.field .hint,.tool-field .field-echo,.tool-field .resolve-amount,.input-card .model-note,.reference-fee-note{margin:3px 0 0!important;padding:0}
.input-card .model-note{margin-top:8px!important;margin-bottom:0!important}
body .fields,.p1-block>div{gap:10px 12px!important}
/* thanh trượt: nhãn - thanh - số liền sát nhau */
.rate-suggestions,.ys-wrap{margin:0!important;padding:0}
.rate-suggestions input[type=range],.ys-wrap input[type=range],.home-rate-reference .rate-suggestions input[type=range]{height:20px!important;min-height:20px!important;margin:0!important;padding:0!important;display:block}
.rate-scale{margin:0!important;line-height:1.3!important}
.tool-field.rate-field>label,.ys-field>label{margin-bottom:6px!important}
/* tiêu đề nhóm */
details.p1-block>summary{padding:12px 0!important;margin:0 0 10px!important}
details.group>summary{padding:12px 14px!important}
body .fields{padding:2px 14px 14px!important}
details.p1-block{padding-bottom:14px!important}
.p1-block+.p1-block,details.group+details.group{margin-top:10px}

/* Chiều cao ô nhập gọn 28px ở mọi nơi (giữ nguyên cỡ chữ) */
body :where(input[type=text],input[type=number],input[type=email],input[type=password],input[type=date],input[type=search],input[type=tel],input[type=url],select){height:28px!important;min-height:28px!important;padding-top:0!important;padding-bottom:0!important}
.inp input:not([type=range]):not([type=checkbox]):not([type=radio]),.inp select,.number-entry input[type=text]{line-height:1.2!important}
.mi-help{margin:1px 0 2px}
/* Căn chữ và số vào đúng giữa ô theo chiều dọc (phông Be Vietnam Pro hay bị lệch lên) */
body :is(input,select):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]){padding-top:1px!important;padding-bottom:0!important}
body .money-value-display{transform:translateY(calc(-50% + 1.3px))!important}
body select:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]){padding-top:0!important;padding-bottom:0!important}
/* Chữ đơn vị (tỷ, triệu) trong số tiền đã nhập: nâng lên để tâm chữ nhỏ trùng tâm chữ số */
body .money-value-display small{position:relative;top:-2px}
/* Giao diện tối */
:root[data-theme=dark] .mi-seg button::before{background:#1b2433}
:root[data-theme=dark] .mi-seg button[aria-pressed=true]::before{background:radial-gradient(circle,var(--brand,#5b9dff) 0 4px,#1b2433 4.5px)}
:root[data-theme=dark] .rs-bubble{background:#5b9dff;color:#0b1220}
/* Điện thoại: đầu trang gọn, không tràn ngang */
@media(max-width:560px){
  body header.top{gap:6px!important}
  body header.top .reading-tools button,body header.top #who .btn,body header.top #who summary,body header.top #who button,body header.top #newBtn{min-height:0!important;height:30px!important;padding:0 10px!important;font-size:12px!important;line-height:1}
  body header.top .profile-pick{flex:1 1 100%!important;max-width:100%!important;min-width:0;display:flex!important;flex-wrap:wrap;gap:6px}
  body header.top .profile-pick #profileSelect{flex:1 1 100%;min-width:0;max-width:100%;width:100%}
  body header.top .profile-pick #pickQuery{flex:1 1 40%;min-width:0;width:auto}
  body header.top .profile-pick #pickKind{flex:1 1 30%;min-width:0;max-width:100%;width:auto}
  body header.top .profile-pick #newBtn{flex:0 0 auto}
}
@media(max-width:560px){.site-bar .site-links{flex-wrap:wrap!important;overflow:visible!important;row-gap:4px}.site-bar .site-links a{padding:6px 9px!important;font-size:13.5px!important}.site-links a.site-cta{margin-left:0!important}}
/* Menu xổ xuống: dùng màu theo giao diện (sáng/tối), bo tròn */
.account-menu,.account-dropdown{--card:var(--surface,var(--page-card,#fff));--soft:var(--surface-2,var(--page-soft,#eef2f7));--brand2:var(--navy,var(--page-brand,#2563eb));--ink2:var(--muted,var(--page-muted,#667c98))}
body .account-menu summary{background:var(--card);color:var(--ink,var(--page-ink,#13233d));border-radius:12px}
body .account-dropdown{background:var(--card);color:var(--ink,var(--page-ink,#13233d));border-radius:16px;padding:8px;box-shadow:0 14px 36px rgba(10,20,40,.28)}
body .account-dropdown a,body .account-dropdown button{border-radius:10px}
:root[data-theme=dark] .account-dropdown{border-color:var(--line,#2a3a58);box-shadow:0 14px 36px rgba(0,0,0,.55)}
:root[data-theme=dark] .site-links a.site-cta,:root[data-theme=dark] .site-mark{background:#2f6fe0;color:#fff}
/* Chế độ màu cho điều khiển gốc (danh sách chọn, thanh cuộn, lịch) */
:root{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark}}
/* Danh sách xổ xuống bo tròn (trình duyệt hỗ trợ) */
@supports (appearance:base-select){
  select,::picker(select){appearance:base-select}
  select::picker-icon{color:var(--muted,#5b6779);transition:rotate .15s}
  select:open::picker-icon{rotate:180deg}
  ::picker(select){box-sizing:border-box;padding:6px;margin-top:4px;border:1px solid var(--line,#d8e0eb);border-radius:14px;background:var(--surface,var(--page-card,#fff));color:var(--ink,var(--page-ink,#13233d));box-shadow:0 14px 36px rgba(10,20,40,.28);max-height:min(320px,60vh)}
  select option{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;font-size:14px;font-weight:400;line-height:1.3;color:var(--ink,var(--page-ink,#13233d));background:transparent;cursor:pointer}
  select option:hover,select option:focus-visible{background:var(--surface-2,var(--page-soft,#eef2f7))}
  select option:checked{font-weight:600;color:var(--navy,var(--page-brand,#1b3358))}
  select option::checkmark{order:2;margin-left:auto;font-size:12px}
}
@supports (appearance:base-select){
  select{display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden}
  select selectedcontent{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
  select::picker-icon{flex:0 0 auto;font-size:10px;line-height:1}
  select option{white-space:normal}
  select optgroup{padding:6px 10px 2px;font-size:12px;font-weight:700;color:var(--muted,#5b6779)}
}
@supports (appearance:base-select){select.pick-kind{min-width:130px}}

/* Chiều cao dòng số nguyên để mọi ô nhập nằm đúng điểm ảnh */
body .field>label,body .tool-field>label{line-height:17px!important}
body .hint,body .field .cap,body .sublabel+.hint{line-height:15px!important}
body .tool-field .field-echo,body .tool-field .resolve-amount,body .input-card .model-note,body .input-sub,body .reference-fee-note,body .save-hint,body #inputStatus,body #draftStatus{line-height:15px!important}
body .mi-help{line-height:16px!important}
body .rate-scale{line-height:17px!important}
@supports (appearance:base-select){
  select::picker-icon{content:"";width:6px;height:6px;border:solid var(--muted,#5b6779);border-width:0 1.6px 1.6px 0;rotate:45deg;margin-top:-3px;font-size:0}
  select:open::picker-icon{rotate:225deg;margin-top:3px}
}
@supports (appearance:base-select){select selectedcontent{flex:1 1 0!important;width:0}select::picker-icon{flex:0 0 8px}}
.field>select,.tool-field>select,.inp>select{width:100%!important;box-sizing:border-box}

/* Tiêu đề nhóm to bằng "Nhập nhanh", in đậm; nhãn ô nhập chữ thường */
body details.p1-block>summary,body details.group>summary{font-size:16.8px!important;font-weight:800!important;line-height:1.3}
body details.group>summary .sum{font-size:13px;font-weight:400}
body .tool-field>label,body .field>label{font-weight:400!important}
/* Nút chọn thay cho danh sách (cách trả) */
.seg2-src{display:none!important}
.seg2{display:flex;gap:6px;flex-wrap:wrap}
.seg2 button{flex:1 1 0;min-width:120px;height:30px;padding:0 12px;border:1px solid var(--line,#d8e0eb);border-radius:999px;background:var(--surface-2,var(--page-soft,#f3f6fb));color:var(--ink,var(--page-ink,#13233d));font:inherit;font-size:13.5px;font-weight:500;cursor:pointer}
.seg2 button.on{background:var(--navy,var(--page-brand,#1b3358));border-color:transparent;color:#fff;font-weight:700}
:root[data-theme=dark] .seg2 button.on{background:#2f6fe0}
/* Bỏ hàng chọn hồ sơ / tìm kiếm / lọc loại ở đầu trang */
body header.top #profileSelect,body header.top #pickQuery,body header.top #pickKind{display:none!important}
/* Tiêu đề nhóm: giữ cỡ lớn, chữ thường */
body details.p1-block>summary,body details.group>summary{font-weight:400!important}
/* Nút cách trả: nhỏ, nhạt */
.seg2{gap:5px}
.seg2 button{flex:0 1 auto;min-width:0;height:26px;padding:0 12px;font-size:12.5px;font-weight:400;border-radius:999px;background:transparent;color:var(--muted,#5b6779)}
.seg2 button:hover{background:var(--surface-2,var(--page-soft,#eef3fa));border-color:#b9c8e0}
.seg2 button.on{background:#e8f0fd;border-color:#b9cdf3;color:#1d4fa8;font-weight:500}
:root[data-theme=dark] .seg2 button.on{background:rgba(91,157,255,.16);border-color:rgba(91,157,255,.4);color:#a9c9ff}
:root[data-theme=dark] .seg2 button:hover{border-color:rgba(91,157,255,.4)}
.seg2{display:grid!important;grid-template-columns:1fr 1fr;gap:6px}
.seg2 button{width:100%;height:24px;padding:0 8px;line-height:1;text-align:center;white-space:nowrap}
.seg2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body .seg2 button{height:26px!important;min-height:0!important;max-height:26px;padding:0 6px!important;font-size:12px!important;overflow:hidden;text-overflow:ellipsis}
body .seg2 button{padding:0 3px!important;font-size:11.5px!important;text-overflow:clip}

/* Biểu đồ tròn (dạng vòng) trong ô kết quả */
.pie-card{margin:14px 0;padding:14px;border:1px solid var(--page-line,#e3e8ef);border-radius:12px}
.pie-card h3{margin:0 0 10px;font-size:14px;line-height:1.35}
.pie-body{display:flex;gap:18px;align-items:center;justify-content:center;flex-wrap:wrap}
.pie-wrap{position:relative;width:170px;height:170px;flex:0 0 auto}
.pie-svg{width:100%;height:100%;display:block}
.pie-slice{animation:pieIn .6s ease both;transition:opacity .2s}
.pie-svg:hover .pie-slice{opacity:.55}
.pie-svg .pie-slice:hover{opacity:1}
@keyframes pieIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.pie-slice{animation:none}}
.pie-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;line-height:1.25}
.pie-center b{font-size:19px;font-weight:700}
.pie-center small{font-size:12px;color:var(--page-muted,#6b7280)}
.pie-legend{list-style:none;margin:0;padding:0;display:grid;gap:10px;flex:1 1 200px;min-width:200px}
.pie-legend li{display:grid;grid-template-columns:12px 1fr auto 44px;gap:8px;align-items:center;font-size:14px}
.pie-legend i{width:12px;height:12px;border-radius:3px}
.pie-legend b{font-weight:700;text-align:right}
.pie-legend em{font-style:normal;color:var(--page-muted,#6b7280);text-align:right}

/* Điện thoại và máy tính bảng (dưới 960px): đầu trang gọn 2 hàng.
   Hàng 1: Sáng/tối, A+, A− ở góc phải. Hàng 2: + Thêm Mới BĐS ở trái, Góp ý và Tài khoản ở phải. Máy tính để bàn giữ nguyên. */
@media (max-width:959px){
  body header.top{display:grid!important;grid-template-columns:minmax(0,1fr) auto;column-gap:8px!important;row-gap:8px!important;align-items:center}
  body header.top>[data-reading-tools]{grid-column:1/-1;grid-row:1;display:flex;justify-content:flex-end;margin:0!important;padding:0!important}
  body header.top>[data-reading-tools] .reading-tools{justify-content:flex-end;margin:0!important;padding:0!important}
  body header.top .profile-pick:not([hidden]){display:contents!important}
  body header.top #newBtn{grid-column:1;grid-row:2;justify-self:start;margin:0!important;white-space:nowrap}
  body header.top #who{grid-column:2;grid-row:2;justify-self:end;margin:0!important;flex-wrap:nowrap}
  body header.top .save-actions{grid-column:1/-1;grid-row:3;margin:0!important}
  body header.top .save-actions:not(:has(#profileSaveStatus:not([hidden]))):not(:has(#retryProfileSave:not([hidden]))){display:none}
}

/* Góp ý và mọi ô nhập nhiều dòng: cao đủ, không bị ép về 1 dòng, tay nắm kéo không đè nút */
.inp:has(textarea){height:auto!important;min-height:0!important;align-items:stretch!important;overflow:visible!important}
.inp textarea,body textarea{display:block!important;width:100%!important;height:auto!important;min-height:132px!important;padding:10px 12px!important;line-height:1.5!important;resize:vertical;box-sizing:border-box}
.inp textarea::placeholder{position:static!important;line-height:1.5!important}
dialog .field:has(textarea){margin-bottom:12px}
dialog .actions{margin-top:12px}

/* Cài đặt trên điện thoại: không để bảng/nút làm cả trang tràn ngang */
#view-settings,#view-settings>*{min-width:0!important;max-width:100%!important;box-sizing:border-box}
#view-settings table{display:block;max-width:100%;overflow-x:auto}
#view-settings .card{overflow-wrap:anywhere}
#view-settings .actions{flex-wrap:wrap}
#view-settings table,#view-settings table.sched{width:100%!important;min-width:0!important;table-layout:auto}
#view-settings{overflow-x:clip}

/* Đợt 3: điện thoại gọn hơn, vùng chạm đủ lớn, tương phản nút xanh */
@media(max-width:560px){
  body:has(nav.tabbar) .site-bar .site-links a:not(.site-cta){display:none}
  body:has(nav.tabbar) .site-bar-in{padding-top:6px;padding-bottom:6px}
  .btn.small,button.small,.tabbar button{min-height:36px}
  header.top .proto{display:none}
}
.site-links a.site-cta,.site-mark{background:#0B57D0;color:#fff}
.site-links a.site-cta:hover{background:#0A49AE}
:root[data-theme=dark] .site-links a.site-cta,:root[data-theme=dark] .site-mark{background:#2f6fe0;color:#fff}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .site-links a.site-cta,:root:not([data-theme=light]) .site-mark{background:#2f6fe0;color:#fff}}
.field-msg,.err-text{color:#B42318}

/* Chú thích biểu đồ tròn: màu qua class, không dùng style nội tuyến (CSP) */
.pie-legend i.pc0{background:#1BB37E}
.pie-legend i.pc1{background:#F0A30A}
.pie-legend i.pc2{background:#EE6A33}
.pie-legend i.pc3{background:#3B82F6}
.pie-legend i.pc4{background:#A66BFF}

/* Đợt 3E: thanh 5 mục cho khách (cong-cu.html), khóa So sánh và Quản lý, nút chọn công cụ rõ nghĩa */
.guest-tabs{display:flex;gap:4px;max-width:1240px;margin:0 auto;padding:8px 16px;overflow-x:auto;border-bottom:1px solid var(--site-line,#DCE4EE);scrollbar-width:none}
.guest-tabs::-webkit-scrollbar{display:none}
.guest-tabs a{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:44px;padding:8px 14px;border-radius:10px;text-decoration:none;color:var(--page-muted,#5A6B80);font-weight:500;font-size:.9rem;white-space:nowrap}
.guest-tabs a svg{width:18px;height:18px;flex:0 0 auto}
.guest-tabs a small{font-size:.72rem;font-weight:500;color:var(--page-muted,#5A6B80);background:rgba(31,95,214,.1);border-radius:99px;padding:1px 7px}
.guest-tabs a:hover{background:rgba(31,95,214,.08)}
.guest-tabs a[aria-current=page]{background:rgba(31,95,214,.12);color:var(--page-ink,#0B2440);font-weight:700}
.guest-tabs a:focus-visible{outline:2px solid var(--site-blue,#1F5FD6);outline-offset:2px}
.guest-tabs svg.lk{width:13px;height:13px;fill:currentColor;stroke:none;opacity:.7;margin-left:-2px}
body.has-guest-tabs .site-bar .site-links a:not(.site-cta){display:none}
body.integrated-tool .guest-tabs,body.integrated-tool .tool-pick{display:none!important}
.tool-pick{margin:14px 0 8px;font-weight:700;font-size:1rem}
.tool-nav a{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-height:52px;justify-content:center}
.tool-nav a b{font-weight:700;font-size:.95rem}
.tool-nav a small{font-size:.78rem;font-weight:400;opacity:.85;line-height:1.25;white-space:normal;text-align:left}
.tool-nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.tool-nav a{border-radius:12px}
/* khách trong app.html: dấu khóa trên 2 mục cần đăng nhập */
.tabbar button{position:relative}
.tabbar button.tab-locked::after{content:"";width:12px;height:12px;background:currentColor;opacity:.65;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat;position:absolute;top:5px;right:calc(50% - 22px)}
@media(min-width:960px){.tabbar button.tab-locked::after{position:static;margin-left:-2px}}

/* Đợt 3E: nút Sáng/Tối, A+, A- nằm cạnh "Hồ sơ của tôi" trên thanh đầu trang dùng thử */
body.has-guest-tabs .site-bar-in>[data-reading-tools]{margin-left:auto}
body.has-guest-tabs .site-bar-in>[data-reading-tools] .reading-tools{margin:0;padding:0;border:0;background:transparent;max-width:none;display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
body.has-guest-tabs .site-bar-in>[data-reading-tools] .reading-tools button{min-height:40px;padding:0 10px;white-space:nowrap}
body.has-guest-tabs .site-links{margin-left:0;width:auto}
@media(max-width:560px){body.has-guest-tabs .site-bar-in{flex-wrap:wrap}body.has-guest-tabs .site-bar-in>[data-reading-tools]{margin-left:0;order:3;width:100%}body.has-guest-tabs .site-links{margin-left:auto}}

/* 2.39: 5 công cụ liên thông. Khung hoàn cảnh dùng chung và một dòng kết luận trên mỗi thẻ */
.common-wrap{display:grid;gap:10px;margin:14px 0 6px}
.common-bar{border:1px solid var(--site-line,#DCE4EE);border-radius:14px;padding:12px 14px;background:var(--site-paper-2,#F5F8FC)}
.common-title{margin:0 0 6px;font-weight:700;font-size:.92rem}
.common-chips{display:flex;flex-wrap:wrap;gap:6px 18px}
.common-chips span{display:flex;flex-direction:column;line-height:1.25}
.common-chips small{font-size:.75rem;color:var(--page-muted,#5A6B80)}
.common-chips b{font-size:1rem;font-variant-numeric:tabular-nums}
.common-hint{margin:6px 0 0;font-size:.8rem;color:var(--page-muted,#5A6B80)}
.tool-pick{margin:4px 0 0}
.tool-pick small{font-weight:400;font-size:.8rem;color:var(--page-muted,#5A6B80);margin-left:6px}
.tool-nav a{min-height:84px;justify-content:flex-start;padding:10px 12px}
.tool-nav a .ans{display:block;margin-top:6px;padding-top:6px;border-top:1px solid rgba(31,95,214,.18);font-size:.84rem;font-weight:600;line-height:1.3;white-space:normal;text-align:left;color:var(--page-ink,#0B2440)}
.tool-nav a .ans::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:1px;background:#14804A}
.tool-nav a .ans-warn::before{background:#C27A00}
.tool-nav a .ans-danger::before{background:#C0362C}
.tool-nav a .ans-need{font-weight:500;color:var(--page-muted,#5A6B80)}
.tool-nav a .ans-need::before{background:transparent;border:1.5px solid currentColor;width:6px;height:6px}
.tool-nav a[aria-current=page] .ans{color:#fff;border-top-color:rgba(255,255,255,.35)}
.tool-nav a[aria-current=page] .ans::before{box-shadow:0 0 0 2px #fff}
html[data-theme=dark] .common-bar{background:var(--site-paper-2,#1B2740)}
html[data-theme=dark] .tool-nav a .ans{color:var(--page-ink,#EAF0FA)}
@media(max-width:560px){.tool-nav{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.tool-nav a{min-height:96px}.common-chips{gap:6px 14px}}
