/* ==========================================================================
   DTL Accounting — Reset
   Load order: tokens.css -> reset.css -> typography.css -> base.css
   Mục đích: đưa mọi trình duyệt về cùng một điểm xuất phát (box model,
   spacing mặc định, media, form controls) trước khi áp Design Tokens.
   Không khai báo màu sắc/font-size cụ thể ở đây — việc đó thuộc typography.css/base.css.
   ========================================================================== */

/* 1. Box-sizing thống nhất, kế thừa cho mọi phần tử con */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. Reset margin/padding mặc định của trình duyệt */
* {
    margin: 0;
    padding: 0;
}

/* 3. Document */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

body {
    min-height: 100%;
    line-height: 1; /* line-height thực tế được định nghĩa lại ở typography.css */
}

/* 4. Loại bỏ list style mặc định cho list dùng cho mục đích layout/navigation.
   Component semantic (VD: breadcrumb <ol>, footer nav) tự quyết định việc
   giữ hay bỏ marker theo ngữ cảnh accessibility của nó. */
ul[role],
ol[role],
ul.reset-list,
ol.reset-list {
    list-style: none;
}

/* 5. Heading/element kế thừa font thay vì dùng font mặc định của trình duyệt.
   Kích thước cụ thể (h1-h6, small, ...) được định nghĩa ở typography.css. */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    overflow-wrap: break-word;
}

/* 6. Media mặc định responsive, tránh tràn container */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 7. Form controls kế thừa typography thay vì dùng font hệ điều hành */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

textarea {
    resize: vertical;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    text-align: inherit;
}

/* 8. Link không tự mang màu/underline — component/typography quyết định
   (tránh xung đột với --color-text-link ở tầng semantic) */
a {
    color: inherit;
    text-decoration: none;
}

/* 9. Table không có spacing/border mặc định của trình duyệt */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 10. Loại bỏ outline mặc định NHƯNG luôn thay thế bằng :focus-visible ring
   ở base.css — không bao giờ để mất focus indicator hoàn toàn
   (theo yêu cầu bắt buộc trong foundations/accessibility.md). */
:focus:not(:focus-visible) {
    outline: none;
}

/* 11. Phần tử ẩn theo thuộc tính hidden luôn được tôn trọng dù có display khác áp lên */
[hidden] {
    display: none !important;
}