@import url('chuyen-canh.css');

.library-article {
  --ink: #18362d;
  --muted: #466155;
  --green: #1e5343;
  --edge: #d8e1d7;
  --paper: #fcfbf7;
  margin: 0;
  color: var(--ink);
  background: #f3f4ee;
  font: 1rem/1.68 "Segoe UI", system-ui, sans-serif;
}
.library-article *, .library-article *::before, .library-article *::after { box-sizing: border-box; }
.library-article a { color: var(--green); text-underline-offset: .19em; }
.library-article a:focus-visible, .library-article button:focus-visible, .library-article input:focus-visible, .library-article textarea:focus-visible {
  outline: 3px solid #9a651e;
  outline-offset: 3px;
}
.library-article > nav, .library-article main > nav {
  width: min(100% - 32px, 1000px);
  margin: 0 auto;
  padding: 16px 0;
  font-size: .92rem;
  font-weight: 650;
}
.library-article main {
  width: min(100% - 32px, 1000px);
  margin: 0 auto 48px;
}
.library-article main > nav { width: 100%; }
.library-article .article-hero {
  margin-bottom: 22px;
  padding: clamp(20px, 5vw, 45px);
  border-radius: 20px;
  background: #1a4336;
  color: #fffef5;
}
.library-article .article-hero a { color: #e8ffd5; }
.library-article .article-kicker {
  margin: 0 0 8px;
  color: #6c5423;
  font-size: .84rem;
  font-weight: 750;
  letter-spacing: .045em;
}
.library-article .article-hero .article-kicker { color: #e6d4a2; }
.library-article h1, .library-article h2, .library-article h3 { line-height: 1.23; }
.library-article h1 { margin: 0; max-width: 27ch; font-size: clamp(1.9rem, 4.7vw, 3.45rem); letter-spacing: -.025em; }
.library-article h2 { margin: 0 0 .75rem; font-size: clamp(1.3rem, 2.7vw, 1.72rem); }
.library-article h3 { margin: 1.35rem 0 .45rem; font-size: 1.12rem; }
.library-article .article-lead { max-width: 72ch; margin: 16px 0 0; font-size: clamp(1.03rem, 2vw, 1.19rem); color: #e4eee5; }
.library-article article > section, .library-article main > section, .library-article .article-section {
  margin: 16px 0;
  padding: clamp(17px, 3.6vw, 32px);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 14px;
}
.library-article p { margin: .55rem 0 .85rem; }
.library-article section > :last-child, .library-article .article-note > :last-child { margin-bottom: 0; }
.library-article li + li { margin-top: .45em; }
.library-article img { display: block; max-width: 100%; height: auto; }
.library-article .article-figure {
  max-width: 100%;
  margin: 1rem 0;
  padding: clamp(10px, 2.4vw, 19px);
  overflow-x: auto;
  border-radius: 11px;
  background: #eaf0e6;
}
.library-article figure figcaption, .library-article caption { margin: .25rem 0 .6rem; text-align: left; font-weight: 650; color: var(--muted); }
.library-article table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.library-article th, .library-article td { padding: .65em .7em; border-bottom: 1px solid #cbdbce; vertical-align: top; }
.library-article th { background: #dbe8d9; }
.library-article tbody tr:nth-child(even) { background: #f7faf5; }
.library-article .article-flow, .library-article .article-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 9px;
  margin: .85rem 0;
  padding: 0;
}
.library-article .article-flow { counter-reset: step; list-style: none; }
.library-article .article-flow li, .library-article .article-metrics > div {
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #d2e0d4;
  border-radius: 9px;
  background: #f8fbf5;
}
.library-article .article-flow li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  margin-bottom: .5em;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: .85rem;
  font-weight: 700;
}
.library-article .article-metrics > div > strong { display: block; color: var(--green); font-size: clamp(1.12rem, 2.5vw, 1.65rem); overflow-wrap: anywhere; }
.library-article .article-metrics > div > span { display: block; color: var(--muted); }
.library-article .article-note { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid #967334; background: #f5efdf; }
.library-article .article-source { color: var(--muted); font-size: .93rem; }
.library-article .article-form { display: grid; gap: .85rem; }
.library-article :is(input:not([type=checkbox]), textarea, select) { font: inherit; max-width: 100%; }
.library-article .article-form :is(input:not([type=checkbox]),textarea,select) { width: 100%; padding: .6rem; border: 1px solid #81968a; border-radius: 7px; color: var(--ink); background: white; }
.library-article .article-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.library-article .article-actions button { padding: .64em 1em; border: 0; border-radius: 7px; background: var(--green); color: white; font: inherit; font-weight: 650; cursor: pointer; }
@media (max-width: 560px) {
  .library-article .article-figure:has(table) table { min-width: 380px; }
  .library-article th, .library-article td { padding: .45em; }
}
@media print {
  .library-article { background: white; color: black; }
  .library-article main { width: 100%; }
  .library-article nav, .library-article .article-actions { display: none; }
  .library-article .article-hero { padding: 0; border: 0; background: transparent; color: black; }
  .library-article .article-hero .article-kicker, .library-article .article-lead { color: black; }
  .library-article table { font-size: .9em; }
  .library-article figure { break-inside: avoid; }
}
.library-article .article-portrait {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--paper);
}
.library-article .article-portrait img { width: clamp(78px, 17vw, 124px); aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.library-article .article-portrait figcaption { margin: 0; }
.library-article .article-portrait figcaption strong, .library-article .article-portrait figcaption span { display: block; }
.library-article .article-portrait figcaption strong { color: var(--ink); font-size: 1.1rem; }
.library-article .article-portrait figcaption span { font-size: .9rem; }
.library-article .article-chart { display: grid; gap: 10px; }
.library-article .article-chart > div { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 1.6fr) 85px; gap: 9px; align-items: center; }
.library-article .article-chart strong { text-align: right; white-space: nowrap; }
.library-article .article-bar { position: relative; height: .85rem; border-radius: 1em; background: #d9e4d8; }
.library-article .article-bar i { position: absolute; top: 0; bottom: 0; left: var(--start, 0%); width: var(--bar); border-radius: 1em; background: #28624e; }
.library-article .article-bar .article-bar-projection { background: repeating-linear-gradient(135deg,#416f59 0 5px,#bfd4c1 5px 8px); }
.library-article .article-bar .article-bar-decline { background: #9b502d; }
.library-article .article-bar-split::after { content: ""; position: absolute; inset: -3px auto -3px 50%; width: 1px; background: #365446; }
@media (max-width: 540px) {
  .library-article .article-chart > div { grid-template-columns: minmax(0, 1fr) auto; }
  .library-article .article-chart .article-bar { grid-column: 1 / -1; grid-row: 2; }
}
