/* Tiểu trại, mockup styles. The rules are in DESIGN.md section 15.

   Every colour, size, space and corner below comes from a short list.
   Type:    12 14 16 21 28 36 48, set in rem so text follows the phone's size setting.
   Spaces:  4 8 12 16 20 24 32 40 48 64, and 2 only to line a mark up with its text.
   Corners: 12 for what can be pressed, 24 for a block that holds rows, 2 for marks, a circle for a point.
   Icons:   24 in navigation, 20 in a row or a notice, 16 inside a tag or a small line. */

:root {
  color-scheme: light;
  --giay: #ffffff;
  --suong: #f1f5ef;
  --la: #0e3b2c;
  --la-phu: rgba(14, 59, 44, .72);   /* the second line of text: 5.3 to 1 on Giấy */
  --la-vien: rgba(14, 59, 44, .58);  /* the edge of a field, a choice, an empty slat: 3 to 1 or better */
  --la-ke: rgba(14, 59, 44, .14);    /* dividing lines. Never the only sign of anything */
  --la-mo: rgba(14, 59, 44, .12);    /* behind a picture or a file */
  --la-cham: rgba(14, 59, 44, .07);  /* under the pointer or the finger */
  --mai: #ffc72c;
  --tren-mai: #0e3b2c;
  --do: #d3271c;

  --bo-nut: 12px;
  --bo-khoi: 24px;
  --bo-dau: 2px;

  --c12: .75rem;
  --c14: .875rem;
  --c16: 1rem;
  --c21: 1.3125rem;
  --c28: 1.75rem;
  --c36: 2.25rem;
  --c48: 3rem;
  --chu-tieu-de: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --chu: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --nhanh: 100ms;  /* a press answering */
  --vua: 200ms;    /* a row leaving, a step filling, a sheet rising */
  --cham: 500ms;   /* a slat rising */
  --em: cubic-bezier(.2, .8, .2, 1);
}

/* Night. The site follows the phone; the mockup's button can force either. */
@media (prefers-color-scheme: dark) {
  :root:not([data-nen="ngay"]) {
    color-scheme: dark;
    --giay: #0b2219;
    --suong: #061710;
    --la: #edf4ee;
    --la-phu: rgba(237, 244, 238, .74);
    --la-vien: rgba(237, 244, 238, .46);
    --la-ke: rgba(237, 244, 238, .16);
    --la-mo: rgba(237, 244, 238, .14);
    --la-cham: rgba(237, 244, 238, .08);
    --do: #ff8a7a;
  }
}
:root[data-nen="dem"] {
  color-scheme: dark;
  --giay: #0b2219;
  --suong: #061710;
  --la: #edf4ee;
  --la-phu: rgba(237, 244, 238, .74);
  --la-vien: rgba(237, 244, 238, .46);
  --la-ke: rgba(237, 244, 238, .16);
  --la-mo: rgba(237, 244, 238, .14);
  --la-cham: rgba(237, 244, 238, .08);
  --do: #ff8a7a;
}

/* On Mai the colours are the day colours, by day and by night. Everything inside follows. */
.can-ban, .khoi-can, .buoc-can, .the-can {
  --giay: #ffffff;
  --la: #0e3b2c;
  --la-phu: rgba(14, 59, 44, .8);
  --la-vien: rgba(14, 59, 44, .66);
  --la-ke: rgba(14, 59, 44, .2);
  --la-mo: rgba(14, 59, 44, .12);
  --la-cham: rgba(14, 59, 44, .1);
  background: var(--mai);
  color: var(--la);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--suong);
  color: var(--la);
  font: 400 var(--c16)/1.5 var(--chu);
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, figcaption, dd { text-wrap: pretty; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
button, input, textarea { font: inherit; color: inherit; }
button { margin: 0; padding: 0; border: 0; background: none; text-align: inherit; cursor: pointer; }
a, button, input, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--la); outline-offset: 3px; }

/* ---------- the sheet around the phones ---------- */
.bia { max-width: 1320px; margin: 0 auto; padding: 48px 24px 8px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: end; justify-content: space-between; }
.bia-ten { font: 800 var(--c48)/1.15 var(--chu-tieu-de); letter-spacing: -.02em; }
.bia-loi { max-width: 56ch; color: var(--la-phu); margin-top: 8px; }
.doi-nen { min-height: 44px; padding: 0 16px; font: 600 var(--c14)/1 var(--chu); border: 1.5px solid var(--la); border-radius: var(--bo-nut); }

.day { max-width: 1320px; margin: 0 auto; padding: 32px 24px 16px; display: flex; flex-wrap: wrap; gap: 40px 32px; justify-content: center; align-items: flex-start; }
.may { width: 390px; max-width: 100%; }
.may-chu { margin-top: 12px; font-size: var(--c14); color: var(--la-phu); max-width: 44ch; }

/* ---------- a phone ---------- */
/* The frame is the drawing of a phone, not part of the interface. Sizes that must fit its width use cqi; on the real site that is vw. */
.phone { container-type: inline-size; background: var(--giay); border: 1px solid var(--la-ke); border-radius: 40px; overflow: hidden; display: flex; flex-direction: column; min-height: 844px; }
.screen { flex: 1; padding: 32px 20px 20px; display: flex; flex-direction: column; }

.dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Titles and the big figure grow with the phone's text size until they fill the line, then stop. */
.ten-trang { font: 800 min(var(--c36), 14cqi)/1.15 var(--chu-tieu-de); letter-spacing: -.02em; }
.ten-trang-nho { font: 800 min(var(--c28), 11cqi)/1.2 var(--chu-tieu-de); letter-spacing: -.015em; margin-top: 16px; }
.toi { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--la); display: grid; place-items: center; font: 600 var(--c14)/1 var(--chu); }
.phu { color: var(--la-phu); font-size: var(--c14); margin-top: 4px; }

/* The way back. The words are small; the place to press is 44 px tall. */
.ve { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; min-height: 44px; margin: -12px 0 -12px -4px; padding: 0 12px 0 4px; border-radius: var(--bo-nut); font-size: var(--c14); color: var(--la-phu); }
.ve svg { width: 20px; height: 20px; flex: none; }

/* the one loud thing: what needs you */
.can-ban { border-radius: var(--bo-khoi); padding: 16px 16px 4px; margin-top: 24px; }
.can-ban-dau { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 12px; }
/* a title gives way first; what sits at its right end drops to its own line only when the text is very large */
.can-ban-dau > .can-ban-ten, .muc > .muc-ten, .khoi-dau > .khoi-ten { flex: 1 1 5em; min-width: 0; }
.can-ban-ten { font: 700 var(--c21)/1.2 var(--chu-tieu-de); }
.can-ban-dem { flex: none; font-size: var(--c14); font-weight: 500; white-space: nowrap; }
.viec { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--la-ke); min-height: 56px; }
.viec-chinh { flex: 1; min-width: 0; }
.viec-ten { font-weight: 600; }
.viec-phu { font-size: var(--c14); color: var(--la-phu); }
.viec svg { width: 20px; height: 20px; flex: none; }

.muc { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 32px; }
.muc-ten { font: 700 var(--c21)/1.2 var(--chu-tieu-de); }
.muc-phu { font-size: var(--c14); color: var(--la-phu); }
/* A link in a line. The padding makes the place to press 44 px tall; the matching negative margin keeps the layout where it was. */
.muc-link { position: relative; z-index: 1; display: inline-block; flex: none; padding: 12px; margin: -12px; border-radius: var(--bo-nut); font-size: var(--c14); line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }

.dong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--la-ke); }
.dong-dau { border-top: 0; }
button.dong { width: 100%; }
.dong-chinh { flex: 1 1 4em; min-width: 0; }
.dong-ten { font-weight: 500; }
.dong-phu { font-size: var(--c14); color: var(--la-phu); }
.han-ngay { flex: none; width: 3.25em; font: 700 var(--c16)/1.5 var(--chu-tieu-de); font-variant-numeric: tabular-nums; }

.tien { font-family: var(--chu-tieu-de); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-lon { font: 800 min(var(--c48), 16cqi)/1.15 var(--chu-tieu-de); letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: 16px; }

/* four states, each a shape as well as a colour */
.dau-hieu { display: inline-flex; align-items: center; gap: 8px; font-size: var(--c14); white-space: nowrap; }
.dau-hieu::before { content: ""; width: 12px; height: 12px; border-radius: var(--bo-dau); flex: none; }
.xong::before { background: var(--la); }
.cho::before { border: 1.5px solid var(--la); }
.can::before { background: var(--mai); border: 1.5px solid var(--tren-mai); }
.loi { color: var(--do); font-weight: 600; }
.loi::before { background: var(--do); transform: rotate(45deg) scale(.9); }

/* mành: one slat per classmate. A filled slat has done it, a hollow one has not: the same pair as the Xong and Đang chờ marks. */
.manh { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 48px; margin-top: 12px; }
.nan { border: 1px solid var(--la-vien); border-radius: var(--bo-dau); transform-origin: bottom; }
.nan-co { background: var(--la); border-color: var(--la); }
.nan-moi { animation: moc var(--cham) var(--em) both; }
@keyframes moc { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.manh-chu { margin-top: 8px; font-size: var(--c14); color: var(--la-phu); }
.manh-chu b { font: 700 var(--c16)/1 var(--chu-tieu-de); color: var(--la); }
.manh-nho { height: 32px; grid-auto-columns: 8px; gap: 4px; justify-content: start; }

/* the bar is for money. Its outline is the whole amount, its fill the part used. */
.thanh { height: 8px; border: 1px solid var(--la-vien); border-radius: var(--bo-dau); margin-top: 8px; overflow: hidden; }
.thanh i { display: block; height: 100%; background: var(--la); }
.dong-cot { display: block; }
.dong-hang { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }

/* ---------- buttons ---------- */
.nut-khoi { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; }
.nut {
  --nen: var(--la);
  --nen-tro: color-mix(in srgb, var(--la) 88%, var(--giay));
  --nen-nhan: color-mix(in srgb, var(--la) 78%, var(--giay));
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 16px;
  text-align: center; font: 600 var(--c16)/1.25 var(--chu);
  border: 1.5px solid var(--la); border-radius: var(--bo-nut);
  background-color: var(--nen); color: var(--giay);
  transition: background-color var(--nhanh);
}
.nut-phu { --nen: transparent; --nen-tro: var(--la-cham); --nen-nhan: var(--la-ke); color: var(--la); }
.nut-nho {
  --nen: transparent; --nen-tro: var(--la-cham); --nen-nhan: var(--la-ke);
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  font: 600 var(--c14)/1.25 var(--chu); white-space: nowrap;
  border: 1.5px solid var(--la); border-radius: var(--bo-nut);
  background-color: var(--nen);
  transition: background-color var(--nhanh);
}
.nut-nho-day { --nen: var(--la); --nen-tro: color-mix(in srgb, var(--la) 88%, var(--giay)); --nen-nhan: color-mix(in srgb, var(--la) 78%, var(--giay)); color: var(--giay); }

/* ---------- a control answering (DESIGN.md 15.6) ---------- */
a.dong, button.dong, a.viec, .rail-muc, .tab, .the, .q-o, .loc a, .vai a, .trang-tab a, .muc-link, .ve, .gio, .chon-muc, .lc, .muc-luc a { transition: background-color var(--nhanh), box-shadow var(--nhanh); }
@media (hover: hover) {
  .nut:hover, .nut-nho:hover { background-color: var(--nen-tro); }
  /* a row has no side padding, so the tint reaches 8 px past it on each side without moving anything */
  a.dong:hover, button.dong:hover, a.viec:hover, .muc-luc a:hover { background-color: var(--la-cham); box-shadow: -8px 0 var(--la-cham), 8px 0 var(--la-cham); }
  .rail-muc:hover, .tab:hover, .the:hover, .q-o:hover, .loc a:hover, .vai a:hover, .trang-tab a:hover, .chon-muc:hover, .doi-nen:hover, a.toi:hover { background-color: var(--la-cham); }
  .muc-link:hover, .gio:hover { text-decoration-thickness: 2px; }
  .ve:hover { color: var(--la); }
}
.nut:active, .nut-nho:active { background-color: var(--nen-nhan); }
a.dong:active, button.dong:active, a.viec:active, .muc-luc a:active { background-color: var(--la-ke); box-shadow: -8px 0 var(--la-ke), 8px 0 var(--la-ke); }
.rail-muc:active, .tab:active, .the:active, .q-o:active, .loc a:active, .vai a:active, .trang-tab a:active, .chon-muc:active, .muc-link:active, .ve:active, .gio:active, .doi-nen:active, a.toi:active { background-color: var(--la-ke); }

/* Sent and waiting for the answer: the button stays pressed and says so. It cannot be pressed twice. */
.nut[aria-busy="true"] { --nen: var(--nen-nhan); --nen-tro: var(--nen-nhan); cursor: progress; }
/* Not possible yet: readable, plainly not a button, and the line above it says what is missing. */
.nut[aria-disabled="true"], .nut:disabled { --nen: var(--la-cham); --nen-tro: var(--la-cham); --nen-nhan: var(--la-cham); border-color: transparent; color: var(--la-phu); cursor: default; }
.thieu { font-size: var(--c14); }

/* the line after an action: what happened, and the way to take it back */
.xong-roi { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 16px; border-radius: var(--bo-nut); background: var(--la); color: var(--giay); font-weight: 500; }
.xong-roi .muc-link { font-size: var(--c16); font-weight: 600; }

/* sealed: recognisable at a glance. A dashed outline is a condition, never an action. */
.niem-phong { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 4px 12px; border: 1.5px dashed var(--la); border-radius: var(--bo-nut); font-size: var(--c14); font-weight: 500; }
.niem-phong svg { width: 16px; height: 16px; flex: none; }

.thong-tin { margin-top: 16px; }
.thong-tin div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--la-ke); }
.thong-tin dt { color: var(--la-phu); }
.thong-tin dd { margin-left: auto; text-align: right; font-weight: 500; }

/* the three confirmations: the state marks, large, with a number because the order is real */
.buoc { margin-top: 8px; }
.buoc-muc { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--bo-nut); }
.buoc-so { flex: none; width: 32px; height: 32px; border-radius: var(--bo-dau); display: grid; place-items: center; font: 700 var(--c16)/1 var(--chu-tieu-de); border: 1.5px solid var(--la); }
.buoc-xong .buoc-so { background: var(--la); color: var(--giay); }

.chung-tu { position: relative; margin-top: 12px; height: 128px; border-radius: var(--bo-nut); background: var(--la-mo); overflow: hidden; display: grid; place-items: center; }
.chung-tu-ten { position: relative; font-size: var(--c14); font-weight: 600; background: var(--giay); padding: 4px 12px; border-radius: var(--bo-dau); }
.thuy-an { position: absolute; inset: -40px; display: grid; align-content: space-around; transform: rotate(-18deg); font-size: var(--c12); white-space: nowrap; color: var(--la); opacity: .34; }

/* Five tabs. The labels stop growing at about 16 px, because five must fit. The bottom padding clears the phone's home bar. */
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--la-ke); padding: 8px 4px max(16px, env(safe-area-inset-bottom)); }
.tab { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 48px; border-radius: var(--bo-nut); font-size: min(var(--c12), 4.2cqi); color: var(--la-phu); }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab-day { color: var(--la); font-weight: 600; }
.tab-day svg { fill: currentColor; fill-opacity: .16; stroke-width: 2; }

/* ---------- a wide screen ---------- */
.khuc { max-width: 1320px; margin: 0 auto; padding: 32px 24px 0; font: 800 var(--c28)/1.2 var(--chu-tieu-de); letter-spacing: -.015em; }
.rong { max-width: 1320px; margin: 0 auto; padding: 24px 24px 16px; display: grid; gap: 48px; }
.may-rong { min-width: 0; }
.may-rong .may-chu { max-width: 78ch; }
.man-cuon { overflow-x: auto; }
.man { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-width: 1100px; min-height: 760px; background: var(--giay); border: 1px solid var(--la-ke); border-radius: var(--bo-khoi); overflow: hidden; }
.man-ba { grid-template-columns: 216px minmax(0, 1fr) 372px; }

.rail { display: flex; flex-direction: column; gap: 4px; padding: 32px 16px 20px; border-right: 1px solid var(--la-ke); }
.rail-ten { font: 800 var(--c21)/1.2 var(--chu-tieu-de); letter-spacing: -.01em; padding: 0 12px 20px; }
.rail-muc { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--bo-nut); color: var(--la-phu); }
.rail-muc svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-day { color: var(--la); font-weight: 600; }
.rail-day svg { fill: currentColor; fill-opacity: .16; stroke-width: 2; }
.rail-day::before { content: ""; position: absolute; left: -16px; top: 50%; width: 4px; height: 24px; margin-top: -12px; border-radius: 0 var(--bo-dau) var(--bo-dau) 0; background: var(--la); }
.rail-dem { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--bo-dau); background: var(--mai); color: var(--tren-mai); font: 700 var(--c14)/1 var(--chu-tieu-de); }
.rail-toi { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 0; font-weight: 500; }

.chinh { padding: 32px 40px 40px; min-width: 0; }
.hai-cot { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 48px; align-items: start; }
.muc-sat { margin-top: 24px; }
.quy-dau { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: end; }

.bang-so { width: 100%; border-collapse: collapse; margin-top: 4px; }
.bang-so th, .bang-so td { padding: 12px 0; text-align: left; font-weight: 400; }
.bang-so thead th { font-size: var(--c14); color: var(--la-phu); padding-bottom: 8px; }
.bang-so tbody th, .bang-so tbody td { border-top: 1px solid var(--la-ke); }
.bang-so tbody th { font-weight: 500; }
.bang-so tbody th .dau-hieu { display: flex; margin-top: 4px; font-weight: 400; }
.bang-so tbody th .loi { font-weight: 600; }
.bang-so .so { text-align: right; width: 132px; font-family: var(--chu-tieu-de); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bang-so thead .so { font-family: var(--chu); font-weight: 400; }
.bang-so .so-loi { color: var(--do); }
.bang-so tfoot th, .bang-so tfoot td { border-top: 2px solid var(--la); font-weight: 600; }
.bang-so tfoot .so { font-weight: 700; }

.tien-cot { width: 120px; text-align: right; }
.dong-chon { position: relative; }
.dong-chon::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: var(--bo-dau); background: var(--la); }
.dong-chon .dong-ten { font-weight: 600; }

.ben { display: flex; flex-direction: column; padding: 32px 24px 24px; border-left: 1px solid var(--la-ke); min-width: 0; }
.ben-dau { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ben-nhan { margin-top: 0; }
.so-vua { font-size: var(--c36); }

/* ---------- a team page: a grid of blocks ---------- */
.trang-dau { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.trang-nut { display: flex; gap: 8px; }
.trang-tab { display: flex; gap: 8px; margin-top: 20px; border-bottom: 1px solid var(--la-ke); overflow-x: auto; }
.trang-tab a { position: relative; flex: none; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: var(--bo-nut) var(--bo-nut) 0 0; color: var(--la-phu); white-space: nowrap; }
.trang-tab a:first-child { margin-left: -8px; }
.trang-tab .trang-tab-day { color: var(--la); font-weight: 600; }
.trang-tab-day::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; background: var(--la); }
/* inside a strip that scrolls sideways the focus ring is drawn inward, so the strip cannot cut it off */
.trang-tab a:focus-visible, .loc a:focus-visible { outline-offset: -3px; }

.luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; margin-top: 32px; align-items: start; }
.khoi { min-width: 0; border-top: 2px solid var(--la); padding-top: 12px; }
.khoi-dau { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.khoi-ten { font: 700 var(--c21)/1.25 var(--chu-tieu-de); }
.khoi-phu { flex: none; font-size: var(--c14); color: var(--la-phu); white-space: nowrap; }
.khoi-doc { margin-top: 32px; }
.r2 { grid-column: span 2; }
.r3 { grid-column: span 3; }
.c2 { grid-row: span 2; }

.khoi-can { border-top: 0; border-radius: var(--bo-khoi); padding: 16px; }
.khoi-can .nut { margin-top: 12px; }
.lc-khoi { margin-top: 8px; }
.lc { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--la-ke); font-weight: 500; cursor: pointer; }

.bv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bv-cot { display: flex; justify-content: space-between; font-size: var(--c14); color: var(--la-phu); padding-bottom: 8px; }
.the { display: grid; gap: 8px; border: 1px solid var(--la-ke); border-radius: var(--bo-nut); padding: 8px 12px; margin-bottom: 8px; font-size: var(--c14); }
.the-ten { font-weight: 500; line-height: 1.35; }
.the-cuoi { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--la-phu); }
.ai { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--la); display: inline-grid; place-items: center; font: 600 var(--c12)/1 var(--chu); color: var(--la); }
.the-can { border-color: var(--mai); }

.mau-dong { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--la-ke); }
.mau-dong-dau { border-top: 0; }
.o-mau { flex: none; width: 32px; height: 32px; border-radius: var(--bo-dau); border: 1px solid var(--la-ke); }
.mau-ma { margin-left: auto; font-size: var(--c14); color: var(--la-phu); font-variant-numeric: tabular-nums; }
.o-mau-hang { display: flex; gap: 8px; }
.o-mau-hang .o-mau { width: 48px; height: 48px; }

.bang-vl .so { width: 104px; }
.bang-vl .cot-ngan { width: 88px; }
.bang-vl .cot-nguon { width: 96px; text-align: right; color: var(--la-phu); }

/* A timeline says how many days it spans, where today falls and how wide its names are: 23 days by default. */
.dtg { --cot: 23; --nay: 15.5; --nhan: 150px; position: relative; display: grid; gap: 8px; margin-top: 4px; font-size: var(--c14); }
.dtg-hang { display: grid; grid-template-columns: var(--nhan) minmax(0, 1fr); align-items: center; gap: 12px; }
.dtg-duong { display: grid; grid-template-columns: repeat(var(--cot), minmax(0, 1fr)); align-items: center; height: 24px; }
.dtg-duong > * { grid-row: 1; }
.dtg-truc .dtg-duong { font-size: var(--c12); color: var(--la-phu); white-space: nowrap; }
.dtg-thanh { height: 12px; border-radius: var(--bo-dau); background: var(--la); }
.dtg-moc { justify-self: center; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--la); }
.dtg-moc-day { background: var(--la); }
/* a date that needs the viewer, and a date at risk: the same two marks as in a row */
.dtg-moc-can { border-width: 1.5px; border-radius: var(--bo-dau); border-color: var(--tren-mai); background: var(--mai); }
.dtg-moc-loi { border-radius: var(--bo-dau); border-color: var(--do); background: var(--do); transform: rotate(45deg) scale(.9); }
.dtg-nay { position: absolute; top: 0; bottom: 0; left: calc(var(--nhan) + 12px + (100% - var(--nhan) - 12px) * var(--nay) / var(--cot)); border-left: 1.5px dashed var(--la); }
.dtg-nay span { position: absolute; top: 0; left: 8px; font-size: var(--c12); white-space: nowrap; }
.dtg-chu { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: var(--c14); color: var(--la-phu); }
.dtg-chu span { display: inline-flex; align-items: center; gap: 8px; }
.dtg-chu .dtg-moc { flex: none; }

.tep { position: relative; aspect-ratio: 4 / 3; border-radius: var(--bo-nut); overflow: hidden; background: var(--la-mo); color: var(--la); }
.tep svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tep .thuy-an { opacity: .3; }
.ghim { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--la); color: var(--giay); display: grid; place-items: center; font: 700 var(--c12)/1 var(--chu-tieu-de); }
.ghim-nho { position: static; flex: none; }
.nx { margin-top: 8px; display: grid; gap: 8px; font-size: var(--c14); }
.nx li { display: flex; gap: 8px; align-items: flex-start; }
.nx b { margin-right: 4px; }
.cham { display: inline-flex; gap: 4px; flex: none; }
.cham i { width: 8px; height: 8px; border-radius: 50%; background: var(--la); }

.loc { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 12px; }
.loc a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: var(--c14); border-radius: var(--bo-nut); border: 1.5px solid var(--la-vien); color: var(--la-phu); white-space: nowrap; }
.loc .loc-day { border-color: var(--la); color: var(--la); font-weight: 600; }

.kem { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.ghi-chu { flex: 1; min-width: 280px; max-width: 520px; padding-top: 8px; }
.ghi-chu-ds { display: grid; gap: 12px; color: var(--la-phu); }
.ghi-chu-ds b { color: var(--la); }

/* ---------- files from outside tools: a card first, a frame after a tap ---------- */
.ngoai { position: relative; aspect-ratio: 16 / 9; border-radius: var(--bo-nut); overflow: hidden; background: var(--la-mo); display: grid; place-items: center; text-align: center; padding: 16px; }
.ngoai-the { display: grid; gap: 8px; justify-items: center; }
.ngoai-nguon { font-size: var(--c14); color: var(--la-phu); }
.ngoai-ten { font: 700 var(--c21)/1.25 var(--chu-tieu-de); }
.ngoai-nho { font-size: var(--c14); color: var(--la-phu); }
.ngoai-chay { background: #0d1513; color: #fff; }
/* what is inside the frame belongs to the outside tool and keeps its own colours, by day and by night */
.ngoai-mo { background: #fff; color: #0e3b2c; padding: 0; border: 1px solid var(--la-ke); }
.ngoai-mo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ngoai-43 { aspect-ratio: 4 / 3; }
.ngoai-chay svg { width: 64px; height: 64px; }
.ngoai-thanh { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: var(--c14); text-align: left; color: #fff; background: rgba(0, 0, 0, .66); }
.ngoai-chu { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 8px; font-size: var(--c14); color: var(--la-phu); }
.ngoai-chu .muc-link { color: var(--la); }
.nhan-ngoai { display: inline-flex; align-items: center; gap: 8px; }
.nhan-ngoai svg { width: 16px; height: 16px; flex: none; }
.gio { position: relative; display: inline-block; flex: none; padding: 12px; margin: -12px; border-radius: var(--bo-nut); font: 700 var(--c14)/1.5 var(--chu-tieu-de); text-decoration: underline; text-underline-offset: 3px; font-variant-numeric: tabular-nums; }

/* ---------- the token sheet ---------- */
.bang { max-width: 1320px; margin: 0 auto; padding: 40px 24px 64px; display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.bang-ten { font: 700 var(--c21)/1.2 var(--chu-tieu-de); margin-bottom: 12px; }
.mau { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.mau-o { width: 56px; height: 56px; border-radius: var(--bo-dau); border: 1px solid var(--la-ke); }
.mau-ten { font-weight: 600; }
.mau-phu { font-size: var(--c14); color: var(--la-phu); }
.mau-chu { font: 800 var(--c36)/1.2 var(--chu-tieu-de); letter-spacing: -.02em; }
.mau-than { margin-top: 8px; max-width: 46ch; }
.chu-thich { font-size: var(--c14); color: var(--la-phu); margin-top: 8px; max-width: 46ch; }
.day-dau { display: grid; gap: 12px; }
.thu { display: grid; gap: 12px; max-width: 350px; }
.thu .o-nhap, .thu .bao, .thu .manh { margin-top: 0; }

/* ---------- mockup chrome: one page per viewer ---------- */
.vai { max-width: 1320px; margin: 0 auto; padding: 20px 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vai a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: var(--c14); border-radius: var(--bo-nut); border: 1.5px solid var(--la-vien); color: var(--la-phu); }
.vai .vai-day { border-color: var(--la); color: var(--la); font-weight: 600; }
.vai-cach { flex-basis: 100%; height: 0; }
.day-trai { justify-content: flex-start; }
main > .kem { max-width: 1320px; margin: 0 auto; padding: 24px 24px 16px; }
.nguoi-xem { display: flex; align-items: center; gap: 8px; font-size: var(--c14); margin-bottom: 12px; color: var(--la-phu); }
.nguoi-xem b { color: var(--la); }
.thay { margin-top: 8px; font-size: var(--c14); color: var(--la-phu); max-width: 44ch; }
.thay b { color: var(--la); }
.may-rong .thay { max-width: 78ch; }
.muc-luc { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; display: grid; }
.muc-luc a { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 20px; padding: 16px 0; border-top: 1px solid var(--la-ke); align-items: baseline; }
.muc-luc b { font: 700 var(--c21)/1.2 var(--chu-tieu-de); }
.muc-luc span { color: var(--la-phu); max-width: 70ch; }

/* ---------- a sheet rising over a screen ---------- */
.phone-to { position: relative; }
.mo { position: absolute; inset: 0; background: rgba(6, 22, 16, .46); }
.to { position: absolute; left: 0; right: 0; bottom: 0; background: var(--giay); border-radius: var(--bo-khoi) var(--bo-khoi) 0 0; padding: 12px 20px max(24px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.to-tay { width: 48px; height: 4px; border-radius: var(--bo-dau); background: var(--la-vien); margin: 0 auto 12px; }
.to-ten { font: 700 var(--c21)/1.2 var(--chu-tieu-de); }
.to .nut-khoi { padding-top: 16px; }

/* ---------- fields and choices ---------- */
.o-nhap { display: grid; gap: 8px; margin-top: 12px; font-size: var(--c14); color: var(--la-phu); }
.o { display: block; width: 100%; min-height: 48px; padding: 12px 16px; border: 1.5px solid var(--la-vien); border-radius: var(--bo-nut); background: var(--giay); font-size: var(--c16); line-height: 1.5; color: var(--la); }
.o:focus-visible { border-color: var(--la); }
textarea.o { min-height: 96px; resize: vertical; }
/* a field that is wrong: a heavier red edge, the red diamond, and a line saying what to do */
.o[aria-invalid="true"] { border-color: var(--do); box-shadow: inset 0 0 0 1px var(--do); }
.o-loi { align-items: baseline; white-space: normal; }
.o-loi::before { position: relative; top: 1px; }

.chon { display: grid; gap: 8px; margin-top: 12px; }
.chon-muc { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1.5px solid var(--la-vien); border-radius: var(--bo-nut); cursor: pointer; }
.chon-muc:has(:checked) { border-color: var(--la); }
/* the round mark of a choice: hollow, or holding a dot */
.tron { -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; padding: 4px; border: 1.5px solid var(--la); border-radius: 50%; background: none; cursor: pointer; }
.tron:checked { background: var(--la) content-box; }
.lc .tron { margin: 0; }
@supports selector(:has(a)) {
  .tron:focus-visible { outline: none; }
  .chon-muc:has(:focus-visible), .lc:has(:focus-visible) { outline: 3px solid var(--la); outline-offset: 3px; }
}

.qr-hang { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.qr { flex: none; width: 112px; height: 112px; border-radius: var(--bo-nut); border: 8px solid #fff; outline: 1px solid var(--la-ke); background: repeating-conic-gradient(#0e3b2c 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ma { font: 700 var(--c21)/1.3 var(--chu-tieu-de); letter-spacing: .02em; }
.ghi { margin-top: 12px; font-size: var(--c14); color: var(--la-phu); }
/* a condition on this screen: private, offline. Dashed, like the sealed tag. */
.bao { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 12px 16px; border: 1.5px dashed var(--la); border-radius: var(--bo-nut); font-size: var(--c14); }
.bao svg { width: 20px; height: 20px; flex: none; }
.trong { padding: 12px 0; color: var(--la-phu); }
.doan { margin-top: 8px; }

/* ---------- something that came from another team ---------- */
.khoi-muon { border-top: 6px double var(--la); }
.tu-nhom { display: flex; align-items: flex-start; gap: 8px; font-size: var(--c14); color: var(--la-phu); margin: 0 0 8px; }
.tu-nhom svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.tu-nhom b { color: var(--la); }
.di-nhom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: var(--c14); color: var(--la-phu); margin-top: 8px; }

/* ---------- the same thing through different eyes ---------- */
.sosanh { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.sosanh-ten { font: 800 var(--c28)/1.2 var(--chu-tieu-de); letter-spacing: -.015em; margin-top: 48px; }
.sosanh-loi { color: var(--la-phu); max-width: 72ch; margin-top: 8px; }
.sosanh-hang { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 24px; margin-top: 24px; align-items: start; }
.o-xem { background: var(--giay); border: 1px solid var(--la-ke); border-radius: var(--bo-khoi); padding: 20px 16px 16px; }
.o-xem-ten { font: 700 var(--c21)/1.25 var(--chu-tieu-de); }
.o-xem .manh { margin-top: 12px; }
.o-xem .dong { padding: 8px 0; }
.o-xem .chung-tu { height: 96px; }

/* ---------- tables that need more columns ---------- */
.bang-rong th, .bang-rong td { padding-right: 12px; vertical-align: top; }
.bang-rong thead th { vertical-align: bottom; }
.bang-rong .giu { display: block; font-size: var(--c14); font-weight: 400; color: var(--la-phu); }
.bang-rong .cot { width: auto; }
.bang-rong .cot-stt { width: 56px; }
.bang-rong .cot-vua { width: 128px; }
.bang-rong .cot-ten { width: 216px; }
.bang-rong .so { width: 96px; padding-right: 0; }
.bang-rong .hs { font: 700 var(--c14)/1 var(--chu-tieu-de); color: var(--la-phu); margin-left: 8px; white-space: nowrap; }
.bang-rong .chua { color: var(--la-phu); }
.bang-rong .lui { padding-left: 32px; }
/* a table of many columns sets its cells one size down; the name that starts each row stays at 16 */
.bang-day td { font-size: var(--c14); }
.bang-day .dau-hieu { align-items: baseline; white-space: normal; }
.bang-day .dau-hieu::before { position: relative; top: 1px; }
.bang-day .khoa { display: flex; align-items: flex-start; }
.bang-day .khoa svg { margin-top: 2px; }
.bang-so tbody th .khoa { display: flex; margin-top: 4px; font-weight: 400; }
.q { text-align: center; white-space: nowrap; }
.bang-so th.q, .bang-so td.q { text-align: center; width: 80px; font-size: var(--c14); white-space: normal; }
/* a cell of the roles grid is a button: 44 px tall, and "không" is quieter by weight and tone but still 5.3 to 1 */
.bang-so td.q-nut { padding: 4px 0; }
.q-o { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 4px; border-radius: var(--bo-nut); text-align: center; font-weight: 600; }
.q-khong .q-o { font-weight: 400; color: var(--la-phu); }
.ten-hang { display: flex; align-items: center; gap: 8px; }

.khoa { display: inline-flex; align-items: center; gap: 4px; font-size: var(--c14); color: var(--la-phu); }
.khoa svg { width: 16px; height: 16px; flex: none; }
.dong > svg { width: 20px; height: 20px; flex: none; color: var(--la-phu); align-self: center; }
/* an icon that leads a row sits on its first line */
.dong > svg:first-child { align-self: flex-start; margin-top: 2px; }

/* ---------- the title face ---------- */
/* Titles are set in the display cut of Bricolage Grotesque (optical size 60) at every size from 21 px up, so a title is never
   mistaken for the text face. Amounts in a row keep the cut for their own size, which keeps figures open at 16 px.
   This rule comes after the font shorthands above because the shorthand resets it. */
.bia-ten, .ten-trang, .ten-trang-nho, .can-ban-ten, .muc-ten, .so-lon, .rail-ten, .khuc, .khoi-ten, .ngoai-ten, .bang-ten, .mau-chu, .muc-luc b, .to-ten, .sosanh-ten, .o-xem-ten { font-variation-settings: "opsz" 60; }

/* ---------- spacing a screen asks for by hand, from the same scale ---------- */
.cach-4 { margin-top: 4px; }
.cach-8 { margin-top: 8px; }
.cach-12 { margin-top: 12px; }
.cach-16 { margin-top: 16px; }
.cach-24 { margin-top: 24px; }
.dem-8 { padding-top: 8px; }
.dem-12 { padding-top: 12px; }
.dem-16 { padding-top: 16px; }

@media (prefers-reduced-motion: reduce) { .nan-moi { animation: none; } }
@media (max-width: 430px) {
  .bia { padding-top: 32px; }
  .bia-ten { font-size: var(--c36); }
  .day { padding-left: 0; padding-right: 0; }
  .may-chu, .thay, .nguoi-xem { padding: 0 20px; }
  .phone { border-radius: 0; border-left: 0; border-right: 0; }
  .muc-luc a { grid-template-columns: minmax(0, 1fr); }
}

/* ======================================================================
   The site's own frame. Everything above is mockup/mockup.css as it was
   (12-frontend.md, 12.11); what follows is what the real pages add, from
   the same tokens. The mockup draws phones; the site is one.
   ====================================================================== */

/* On a phone the page is the screen: the whole width, the tabs held at the bottom.
   The frame is the container, so the sizes the mockup set in cqi follow the screen. */
.khung { container-type: inline-size; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--giay); }
.khung > .screen { width: 100%; max-width: 640px; margin: 0 auto; }
.khung > .tabs { position: sticky; bottom: 0; background: var(--giay); }
.khung > .rail { display: none; }
.ten-trang-to { flex: 1 1 5em; min-width: 0; }

/* A page with no frame: signing in, an invite, an error. */
.don { container-type: inline-size; display: flex; flex-direction: column; width: 100%; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 48px 20px 32px; background: var(--giay); }
.don .nut-khoi { margin-top: 32px; }
.don-chu { margin-top: 16px; }

/* From 900 px the tabs become the rail, and the page sits on Sương (DESIGN 15.2, 15.4). */
@media (min-width: 900px) {
  .khung { display: grid; grid-template-columns: 216px minmax(0, 1fr); max-width: 1320px; min-height: calc(100dvh - 48px); margin: 24px auto; border: 1px solid var(--la-ke); border-radius: var(--bo-khoi); overflow: hidden; }
  .khung > .rail { display: flex; }
  .khung > .tabs { display: none; }
  .khung > .screen { max-width: none; margin: 0; padding: 32px 40px 40px; }
  .don { min-height: 0; margin-top: 64px; border: 1px solid var(--la-ke); border-radius: var(--bo-khoi); padding: 40px 32px 32px; }
}

/* A deliverable's version (DESIGN 4.4): its pictures, each page of a PDF, as
   the files host draws them; a DOCX's text under the viewer's line, which the
   text stays selectable through; a player that fetches nothing until played. */
.trang-anh { display: block; width: 100%; height: auto; margin-top: 12px; border: 1px solid var(--la-ke); border-radius: var(--bo-nut); background: var(--la-mo); }
.ban-chu { position: relative; overflow: hidden; margin-top: 12px; padding: 16px; border: 1px solid var(--la-ke); border-radius: var(--bo-nut); }
.ban-chu p { position: relative; margin: 0 0 12px; white-space: pre-wrap; }
.ban-chu .thuy-an { pointer-events: none; user-select: none; }
/* A document's table: every cell drawn, so an empty one can be seen and
   tapped, and words that wrap, so eight columns still fit a phone. */
.ban-chu .bang-so { margin-bottom: 12px; }
.ban-chu .bang-so td { padding: 8px; border: 1px solid var(--la-ke); vertical-align: top; overflow-wrap: anywhere; }
.ban-chu .bang-so td p { margin: 0; }
.choi { display: block; width: 100%; margin-top: 12px; }

/* The document editor island (12-frontend.md, 12.6): ProseMirror's own few
   rules, its toolbar held at the top while the text scrolls, and its line of
   status. And an outside file's frame, loaded only when asked (DESIGN 12.4). */
.ProseMirror { position: relative; word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; font-variant-ligatures: none; outline: none; min-height: 40vh; }
.ProseMirror li { position: relative; }
.ProseMirror-hideselection *::selection { background: transparent; }
.ProseMirror-selectednode { outline: 2px solid var(--la); }
.soan-cong-cu { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 8px 0; background: var(--giay); }
.soan-trang-thai.loi { color: var(--do); }
.anh-cho { display: inline-block; padding: 4px 8px; border: 1px dashed var(--la-ke); border-radius: var(--bo-nut); }
.khung-ngoai { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nut-nho { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--la-vien); border-radius: var(--bo-nut); background: var(--giay); color: var(--la); font: inherit; font-size: var(--c14); cursor: pointer; }

/* A bar's share, from a number the server computed (CLAUDE.md: style= holds
   only such numbers): the cap of small payments on the Director's list. */
.thanh i { width: calc(var(--phan, 0) * 1%); }

/* The notice after an action (DESIGN 15.6, 13.4): it stays in view above the
   tabs at the foot of the screen, and its Hoàn tác is a small form in the
   Giấy of the line. From 900 px there are no tabs below it. */
.screen > .xong-roi { position: sticky; bottom: 88px; z-index: 2; margin-top: 24px; }
.xong-roi form { display: contents; }
.xong-roi button.muc-link { border: 0; background: none; color: inherit; font: inherit; font-size: var(--c16); font-weight: 600; cursor: pointer; }
@media (min-width: 900px) {
  .screen > .xong-roi { bottom: 24px; }
}

/* The blocks of DESIGN 12.3 and 12.4. Each takes its place from numbers the
   server worked out: a timeline's bar from its first column and its length,
   a swatch from its three channels, a pin from its two percentages. A bar
   past the deadline it counts back from is drawn in Đỏ. */
.dtg-duong > [style] { grid-column: var(--tu) / span var(--dai, 1); }
.dtg-thanh.dtg-tre { background: var(--do); }
.dtg-chu li { list-style: none; }
.o-mau[style] { background: rgb(var(--r) var(--g) var(--b)); }
.dong-ho-so { margin-top: 12px; font: 700 var(--c36)/1 var(--chu-tieu-de); font-variant-numeric: tabular-nums; }
.dong-ho-so.qua { color: var(--do); }
.dong-ho-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bieu-do { display: block; width: 100%; height: auto; margin-top: 12px; }
.bd-cot, .bd-diem { fill: var(--la); }
.bd-duong { fill: none; stroke: var(--la); stroke-width: 1; }
.bd-phan { stroke: var(--giay); stroke-width: 1; }
.bd-phan-1 { fill: var(--la); }
.bd-phan-2 { fill: var(--mai); }
.bd-phan-3 { fill: var(--la-phu); }
.bd-phan-4 { fill: var(--la-ke); }
.bd-vong-nen, .bd-vong { fill: none; stroke-width: 12; }
.bd-vong-nen { stroke: var(--la-mo); }
.bd-vong { stroke: var(--la); }
.tep-hang { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.tep-ban { margin: 0; }
.tep-anh { position: relative; }
.tep-anh img { display: block; width: 100%; height: auto; border: 1px solid var(--la-ke); border-radius: var(--bo-nut); background: var(--la-mo); }
.tep-anh .ghim { left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(-50%, -50%); }
/* A form folded away under its link: Sửa cột, Cài đặt khối, Sửa bảng màu.
   A block, not the link row's flex, so the form keeps the column's width. */
details.mo-them { display: block; margin-top: 8px; font-size: var(--c14); }
details.mo-them > summary { cursor: pointer; list-style: none; }
details.mo-them > summary::-webkit-details-marker { display: none; }
details.mo-them[open] > summary { margin-bottom: 8px; }
/* A timeline's last labels end at their column, so a date never runs past the screen. */
.dtg-truc .dtg-cuoi { justify-self: end; }
/* Print (12-frontend.md, 12.3; DESIGN 13.6, 14.8): the third block, kept
   last. No frame, black on white, no controls. It is how the run sheet, the
   roll-call sheets and the camp float sheet become paper on 28/01. A sheet
   is a .to-in, one to a page; its grid is a .bang-in, with an empty box to
   fill by hand. */
.bang-in { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: var(--c14); }
.bang-in th, .bang-in td { padding: 6px 8px; border: 1px solid var(--la-vien); text-align: left; vertical-align: top; }
.bang-in th { font-weight: 600; }
.bang-in .o-trong { width: 3.5em; }
.to-in + .to-in { margin-top: 32px; }
@media print {
  :root, :root:not([data-nen="ngay"]), :root[data-nen="dem"] {
    color-scheme: light;
    --giay: #fff; --suong: #fff; --la: #000; --la-phu: #333; --la-vien: #000; --la-ke: #777;
    --la-mo: #e5e5e5; --la-cham: transparent; --mai: #fff; --tren-mai: #000; --do: #000;
  }
  body { background: #fff; font-size: 11pt; }
  .rail, .tabs, .xong-roi, .ve, .muc-link, .nut-khoi, .nut, form, details.mo-them, [data-hop-thu-cho], [data-ban-luu] { display: none !important; }
  .khung, .khung > .screen, .screen { display: block; max-width: none; min-height: 0; padding: 0; }
  .dong, .bang-in tr { break-inside: avoid; }
  .to-in { break-after: page; }
  .to-in + .to-in { margin-top: 0; }
  .dau-hieu { border: 1px solid #000; background: none; }
  @page { margin: 12mm; }
}
