/* TheGentleMinh site. Phone first; dark and light follow the device. */
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url(/fonts/BeVietnamPro-Bold.woff2) format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 800; font-display: swap; src: url(/fonts/BeVietnamPro-ExtraBold.woff2) format("woff2"); }

:root {
  --bg: #0b0d0e;
  --bg2: #14181a;
  --line: #262c2f;
  --text: #e9eeee;
  --muted: #9aa6a8;
  --teal: #22d3c5;
  --link: #22d3c5;
  --on-teal: #0b0d0e;
  --warn: #ffcf5a;
  --radius: 14px;
  --head: "Be Vietnam Pro", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8f8;
    --bg2: #ffffff;
    --line: #dbe2e3;
    --text: #0b0d0e;
    --muted: #556264;
    --teal: #22d3c5;
    --link: #08736c;
    --warn: #8a5a00;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.measure, .lede, main > .prose, .empty .prose { max-width: 72ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--teal); color: var(--on-teal); padding: 6px 10px; z-index: 9; }

h2, h3 { scroll-margin-top: 110px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; margin: 0.4em 0 0.3em; }
h2 { font-size: 1.35rem; margin: 2em 0 0.6em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 0.4em; font-weight: 700; }
.kicker { font-family: var(--head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.lede { font-size: 1.12rem; color: var(--text); }
.meta, .crumb, .small { color: var(--muted); font-size: 0.9rem; }
.crumb { margin: 1.5em 0 0; }
.crumb a { color: var(--muted); }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--head); font-weight: 800; font-size: 1.05rem; }
.brand img { border-radius: 50%; }
.brand b { color: var(--teal); font-weight: 800; }
.top nav { display: flex; gap: 2px; overflow-x: auto; margin: 0 -8px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 8px; font-family: var(--head); font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.top nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--teal); }

/* buttons */
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0 0; }
.btn { display: inline-block; background: var(--teal); color: var(--on-teal); text-decoration: none; font-family: var(--head); font-weight: 700; padding: 10px 16px; border-radius: 999px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn:hover { filter: brightness(1.07); }

/* home */
.hero { display: grid; gap: 8px; padding: 24px 0 8px; align-items: center; }
.hero h1 { font-size: 2rem; margin-top: 0.2em; }
.hero-img { width: 132px; border-radius: 50%; box-shadow: 0 0 0 3px var(--teal); order: -1; }
@media (min-width: 640px) {
  .hero { grid-template-columns: 1fr 240px; gap: 32px; padding-top: 40px; }
  .hero-img { width: 240px; order: 0; }
  h1, .hero h1 { font-size: 2.3rem; }
}

/* video cards */
.vgrid { display: grid; gap: 20px; margin-top: 16px; }
.vcard { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vcard .thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vbody { padding: 14px 16px 16px; }
.vbody h3 { margin: 0.25em 0 0; font-size: 1.08rem; }
.vbody h3 a { color: var(--text); text-decoration: none; }
.vbody .links { margin-top: 12px; }
.vbody .btn { padding: 8px 14px; font-size: 0.9rem; }
.from-video { margin: 20px 0; }
.related { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.related ul { margin: 6px 0 0; padding-left: 20px; }

/* chapter lists */
.chapters { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.chapters a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.chapters a:hover { border-color: var(--teal); }
.chapters .num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--teal); color: var(--on-teal); font-family: var(--head); font-weight: 800; display: grid; place-items: center; }
.chapters b { display: block; font-family: var(--head); font-weight: 700; line-height: 1.35; }
.chapters small { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 4px; line-height: 1.5; }
.chapters.compact a { align-items: center; }

/* chapter page */
.toc { border-left: 3px solid var(--teal); padding: 2px 0 2px 14px; margin: 24px 0; }
.toc p { margin: 0 0 4px; font-family: var(--head); font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; }
.prose li { margin: 0.3em 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose code { font-size: 0.9em; background: var(--bg2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }
blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.box { border-radius: var(--radius); padding: 4px 18px; margin: 1.4em 0; border: 1px solid var(--line); background: var(--bg2); }
.box-todo { border: 2px solid var(--teal); }
.box-todo h2, .box-todo h3 { margin-top: 0.9em; }
.box-warn { border-left: 4px solid var(--warn); }
.draft { background: #ffcf5a; color: #000; font-weight: 700; padding: 8px 12px; border-radius: 8px; margin-top: 16px; }

/* tables: rows become cards on phones */
.table { margin: 1.2em 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: var(--head); font-weight: 700; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 599px) {
  table, thead, tbody, tr, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 12px; padding: 6px 0; }
  td { border: 0; padding: 6px 14px; }
  td::before { content: attr(data-label); display: block; font-family: var(--head); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  td:first-child { font-weight: 600; }
}
@media (min-width: 600px) {
  .table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg2); }
  tr:last-child td { border-bottom: 0; }
}

/* checklist */
.checklist { list-style: none; padding: 0 !important; }
.checklist li { margin: 0 0 8px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.checklist input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--teal); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--teal); }

/* pager, empty, footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 40px 0 8px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); font-size: 0.92rem; line-height: 1.4; }
.pager a span { display: block; color: var(--muted); font-family: var(--head); font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }
.pager .next { text-align: right; }
.empty { display: grid; gap: 16px; justify-items: start; background: var(--bg2); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.empty img { width: 120px; border-radius: 50%; box-shadow: 0 0 0 3px var(--teal); }
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 20px 0 32px; color: var(--muted); font-size: 0.92rem; }
.foot a { color: var(--muted); }
section h2 { margin-top: 1.6em; }

@media print {
  .top, .foot, .pager, .toc, .from-video .thumb, .ch-side { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
}

/* glossary: term buttons open a native popover (no JS) */
.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help;
  text-decoration: underline dotted var(--teal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.term:hover { color: var(--link); }
.tnpop { display: none; }
.tnpop:popover-open { display: block; }
.tnpop { width: min(92vw, 420px); margin: auto; padding: 16px 18px 12px; border: 1px solid var(--line); border-top: 4px solid var(--teal);
  border-radius: var(--radius); background: var(--bg2); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.tnpop::backdrop { background: rgba(0,0,0,.45); }
.tnpop p { margin: 0 0 8px; }
.tn-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tn-en { text-transform: none; letter-spacing: 0; font-style: italic; color: var(--muted); font-weight: 400; font-family: var(--body); font-size: .85rem; }
.tn-label .tn-en::before { content: "· "; }
.tn-term { font-family: var(--head); font-weight: 800; font-size: 1.2rem; }
.tn-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; margin-top: 4px; }
.tn-links button { font: inherit; font-family: var(--head); font-weight: 700; background: var(--teal); color: var(--on-teal); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.glossary { margin: 1.2em 0 2em; }
.gl-item { border-top: 1px solid var(--line); padding: 14px 0; scroll-margin-top: 110px; }
.gl-item:target { background: var(--bg2); box-shadow: -10px 0 0 var(--bg2), 10px 0 0 var(--bg2); }
.gl-item dt { font-family: var(--head); font-weight: 800; font-size: 1.1rem; }
.gl-item dt .tn-en { margin-left: 6px; }
.gl-item dd { margin: 4px 0 0; }
.gl-item dd p { margin: 0 0 4px; }
.gl-meta { color: var(--muted); font-size: .9rem; }
.more { margin: 1.5em 0; }
@media print { .tnpop, .term { all: unset; } }

/* email signup (plain form, posts to the email provider) */
.signup { margin: 2.5em 0; padding: 20px; background: var(--bg2); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); }
.signup h2 { margin-top: 0; }
.signup label { display: block; font-weight: 600; margin: 0.8em 0 0.4em; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input { flex: 1 1 220px; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 10px 16px; }
.signup input:focus { border-color: var(--teal); outline: none; }
.signup button { border: 0; cursor: pointer; flex: 0 0 auto; }
.signup .small { margin-bottom: 0; }
@media print { .signup { display: none; } }

/* chapter page: head, sidebar, body. Phone: one column, signup after the text */
.ch-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.ch-side, .ch-stick { display: contents; }
.ch-head { order: 1; }
.ch-side .from-video { order: 2; }
.ch-side .toc { order: 3; }
.chapter { order: 4; min-width: 0; }
.ch-side .signup { order: 5; }
.ch-grid > .tnpop { order: 6; }

/* desktop (main design): wider layouts, sidebar beside the text */
@media (min-width: 1024px) {
  .wrap { padding: 0 32px; }
  h1, .hero h1 { font-size: 2.6rem; }
  .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding: 64px 0 24px; }
  .hero-img { width: 300px; justify-self: end; }
  .hero .prose { max-width: 62ch; }

  .ch-grid { grid-template-columns: minmax(0, 72ch) 340px; column-gap: 64px; justify-content: space-between; align-items: start; }
  .ch-head { grid-column: 1; grid-row: 1; }
  .chapter { grid-column: 1; grid-row: 2; }
  .ch-side { display: block; grid-column: 2; grid-row: 1 / span 2; align-self: stretch; margin-top: 40px; }
  .ch-stick { display: block; position: sticky; top: 84px; }
  .ch-side .from-video { margin-top: 0; }
  .ch-side .vbody h3 { font-size: 0.98rem; }
  .ch-side .toc { margin: 0 0 20px; padding-top: 20px; }
  .ch-side .toc ol { font-size: 0.95rem; }
  .ch-side .signup { margin: 20px 0 0; padding: 16px; }
  .ch-side .signup h2 { font-size: 1.1rem; }
  .ch-side .signup p, .ch-side .signup label { font-size: 0.95rem; }
  .ch-side .signup .small { font-size: 0.8rem; }
  .pager { max-width: 72ch; }

  /* lists and grids */
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .chapters a { height: 100%; }
  .vgrid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
  .vcard-big { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .vcard-big .thumb { height: 100%; }
  .vcard-big .vbody { padding: 28px; align-self: center; }
  .vcard-big .vbody h3 { font-size: 1.4rem; }
  .glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .gl-item:target { box-shadow: none; outline: 10px solid var(--bg2); }

  /* signup outside the sidebar: text left, form right */
  main > .signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; padding: 28px 32px; }
  main > .signup h2, main > .signup > p:first-of-type { grid-column: 1; }
  main > .signup form { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  main > .signup .small { grid-column: 1 / -1; }
}

/* ---------- tools (Công cụ) ---------- */
.toolgrid { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.toolgrid a { display: block; height: 100%; padding: 16px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.toolgrid a:hover { border-color: var(--teal); }
.toolgrid b { display: block; font-family: var(--head); font-weight: 800; font-size: 1.1rem; margin: 4px 0; }
.toolgrid small { display: block; color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.local-note { margin-top: -0.4em; }
.tool { margin: 20px 0 8px; }
.tool-in { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.field { margin: 0 0 14px; flex: 1 1 180px; min-width: 0; }
.field-sm { flex: 0 1 120px; }
.field-row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.field label, .opts legend { display: block; font-weight: 600; font-size: 0.95rem; margin: 0 0 6px; }
.field input[type="text"], .field input[type="file"] { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.field input:focus { border-color: var(--teal); outline: none; }
.field .small { margin: 4px 0 0; }
#ytp-count.bad { color: var(--warn); font-weight: 700; }
.opts { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.opts legend { width: 100%; }
.opts label { display: inline-flex; gap: 6px; align-items: center; font-size: 0.95rem; cursor: pointer; }
.opts input { accent-color: var(--teal); width: 18px; height: 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; font-size: 0.93rem; }
.checks:empty { display: none; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks .mark { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; }
.checks .ok .mark { background: var(--teal); color: var(--on-teal); }
.checks .warn .mark { background: var(--warn); color: #000; }
.tool-notes { margin-top: 28px; }
.code { position: relative; margin: 1em 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.code-label { display: block; padding: 6px 14px 0; font-family: var(--head); font-weight: 700; font-size: 0.78rem; color: var(--muted); }
.code pre { margin: 0; padding: 8px 14px 12px; overflow-x: auto; }
.code code { font: 0.92rem/1.5 ui-monospace, Consolas, Menlo, monospace; background: none; border: 0; padding: 0; }

/* YouTube look-alike (approximate sizes; Roboto if installed) */
.ytm-out { --y-bg: #0f0f0f; --y-t: #f1f1f1; --y-m: #aaaaaa; background: var(--y-bg); color: var(--y-t); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; font-family: Roboto, Arial, sans-serif; }
.ytm-out[data-theme="light"] { --y-bg: #ffffff; --y-t: #0f0f0f; --y-m: #606060; }
.ytm-out p { margin: 0; }
.ytm-sec + .ytm-sec { margin-top: 22px; }
.ytm-h { font-family: var(--head); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--y-m); margin: 0 0 10px; }
.ytm-row { display: flex; flex-wrap: wrap; gap: 16px; }
.ytm-row-search, .ytm-row-side { display: grid; grid-template-columns: minmax(0, 1fr); }
.ytm-slot { min-width: 0; max-width: 100%; }
.ytm-out .ytm-label { font-size: 12px; color: var(--y-m); margin-bottom: 4px; }
.ytm-thumb { position: relative; flex-shrink: 0; height: auto; aspect-ratio: 16 / 9; overflow: hidden; background: #3f3f3f; border-radius: 12px; }
.ytm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ytm-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #bbb; font-size: 13px; }
.ytm-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.8); color: #fff; font: 500 12px/18px Roboto, Arial, sans-serif; padding: 0 4px; border-radius: 4px; }
.ytm-thumb:has(.ytm-prog) .ytm-dur { bottom: 10px; }
.ytm-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(170, 170, 170, 0.6); }
.ytm-prog span { display: block; height: 100%; width: 40%; background: #ff0000; }
.ytm-info { display: flex; gap: 12px; }
.ytm-txt { position: relative; min-width: 0; }
.ytm-av { flex: 0 0 36px; height: 36px; border-radius: 50%; background: #717171; }
.ytm-title { --lines: 2; color: var(--y-t); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines); line-clamp: var(--lines); overflow: hidden; word-break: break-word; }
.ytm-probe { position: absolute; visibility: hidden; display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; height: auto; left: 0; top: 0; }
.ytm-meta { color: var(--y-m); }
.ytm-home { width: 360px; max-width: 100%; }
.ytm-home .ytm-info { margin-top: 12px; }
.ytm-home .ytm-title { font-size: 16px; line-height: 22px; font-weight: 500; margin-bottom: 4px; }
.ytm-home .ytm-meta, .ytm-phone .ytm-meta { font-size: 14px; line-height: 20px; }
.ytm-search { display: flex; align-items: flex-start; gap: 16px; width: 100%; }
.ytm-search .ytm-thumb { flex: none; width: min(500px, 50%); }
.ytm-search .ytm-title { font-size: 18px; line-height: 26px; font-weight: 400; margin-bottom: 4px; }
.ytm-search .ytm-meta { font-size: 12px; line-height: 18px; }
.ytm-side { display: flex; align-items: flex-start; gap: 8px; width: 402px; max-width: 100%; }
.ytm-side .ytm-thumb { flex: none; width: 168px; border-radius: 8px; }
.ytm-side .ytm-title { font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 4px; }
.ytm-side .ytm-meta { font-size: 12px; line-height: 18px; }
.ytm-phone { width: 375px; max-width: 100%; border: 1px solid rgba(128, 128, 128, 0.3); border-radius: 16px; overflow: hidden; }
.ytm-phone .ytm-thumb { border-radius: 0; }
.ytm-phone .ytm-info { padding: 12px; }
.ytm-phone .ytm-title { font-size: 15px; line-height: 21px; font-weight: 500; margin-bottom: 2px; }
.ytm-out .ytm-cut { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--y-m); max-width: 100%; }
.ytm-row-home .ytm-slot { width: 360px; }
.ytm-row-phone .ytm-slot { width: 375px; }
.ytm-row-side .ytm-slot { width: 402px; }
.ytm-cut b { color: var(--y-t); }

/* YPP checker */
.ypp-out { display: grid; gap: 14px; margin-top: 16px; }
.ypp-block { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.ypp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ypp-head h3 { margin: 0; font-size: 1.05rem; }
.ypp-block > .small { margin: 4px 0 8px; }
.ypp-badge { flex: 0 0 auto; font-family: var(--head); font-weight: 800; font-size: 0.85rem; padding: 3px 12px; border-radius: 999px; }
.ypp-badge.ok { background: var(--teal); color: var(--on-teal); }
.ypp-badge.no { box-shadow: inset 0 0 0 2px var(--warn); color: var(--warn); }
.ypp-badge.unknown { box-shadow: inset 0 0 0 2px var(--line); color: var(--muted); }
.ypp-group { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.ypp-req { margin: 6px 0; }
.ypp-req-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.93rem; }
.ypp-req-v { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.ypp-req.ok .ypp-req-v { color: var(--text); font-weight: 600; }
.ypp-meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 4px; }
.ypp-meter span { display: block; height: 100%; width: 0; background: var(--warn); border-radius: 999px; }
.ypp-req.ok .ypp-meter span { background: var(--teal); }
.ypp-gap { margin: 3px 0 0; font-size: 0.85rem; color: var(--warn); }
.ypp-or { margin: 2px 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
@media (min-width: 1024px) {
  .toolgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tool[data-ytp] { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .tool[data-ytp] .tool-in { position: sticky; top: 84px; }
  .tool[data-ytp] .ytm-out { margin-top: 0; padding: 20px; }
  .ypp-out { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tool-notes, .tool-in > .small { max-width: 72ch; }
}
[hidden] { display: none !important; }
