
.tv-guide,.tvdl-site-dialog {
  --ink:var(--t7);
  --line:var(--t9);
  --soft:var(--t3);
  --guide-gold:var(--t5);
  --green:var(--t0);
}
.tv-guide h1,.tv-guide h2,.tv-guide h3,.tv-guide p { margin:0; }
.tv-guide img { display:block; max-width:100%; height:auto; }
.tv-guide a:focus-visible,.tv-guide button:focus-visible,.tv-guide summary:focus-visible {
  outline:3px solid #a36412; outline-offset:4px;
}
.tv-guide { display:grid; gap:18px; }
.guide-hero {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:24px;
  background:linear-gradient(145deg,var(--t1),var(--t2)); color:#fff;
  border-radius:24px; padding:clamp(18px,4vw,44px);
}
.guide-hero h1 { font-size:clamp(1.9rem,4.6vw,3.2rem); line-height:1.22; margin-block-end:10px; }
.guide-hero p { max-width:36ch; }
.guide-hero img { width:100%; }
.guide-actions { display:grid; gap:8px; margin-block:16px 12px; }
.guide-button {
  display:inline-flex; align-items:center; justify-content:center; min-height:48px;
  border:1px solid transparent; border-radius:12px; padding:8px 14px;
  font-weight:750; color:#fff; background:var(--green); text-align:center; text-decoration:none;
}
.guide-button:hover { text-decoration:underline; text-underline-offset:3px; }
.guide-button-gold { color:#142d26; background:var(--guide-gold); }
.guide-button-light { background:#fff; color:var(--green); }
.guide-hero .guide-button:focus-visible { outline-color:#fff; }
.guide-compat { font-size:.87rem; }
.guide-card {
  min-width:0; padding:clamp(15px,3vw,26px); border-radius:18px;
  border:1px solid var(--line); background:#fff;
}
.guide-card h2 { font-size:clamp(1.2rem,3vw,1.55rem); }
.guide-card h2,.guide-card h3 { color:var(--green); }
.guide-method-head { display:flex; align-items:center; gap:10px; }
.guide-method-head img { width:38px; border-radius:9px; }
.guide-code {
  display:flex; gap:12px; justify-content:space-between; align-items:center;
  background:var(--soft); border:1px solid var(--line); border-radius:14px;
  margin-top:14px; padding:8px 10px;
}
.guide-code strong { font:800 clamp(1.2rem,6.5vw,2.1rem)/1 ui-monospace,monospace; letter-spacing:.06em; user-select:all; }
.guide-code .guide-button { min-width:100px; }
.guide-copy-status { display:block; min-height:1.65em; margin-block:3px; font-size:.87rem; }
.guide-steps { padding-inline-start:22px; margin:4px 0 0; }
.guide-steps li + li { margin-block-start:7px; }
.guide-steps li::marker { color:var(--green); font-weight:750; }
.guide-details > summary {
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  color:var(--green); font-weight:750; min-height:44px; cursor:pointer; list-style:none;
}
.guide-details > summary::-webkit-details-marker { display:none; }
.guide-details > summary::after {
  content:""; display:block; flex:none; width:8px; height:8px;
  border-inline-end:2px solid currentColor; border-block-end:2px solid currentColor;
  transform:rotate(45deg); margin-inline-end:7px;
}
.guide-details[open] > summary::after { transform:rotate(225deg); }
.guide-details[open] > summary { margin-block-end:8px; }
.guide-details .guide-button { margin-block:10px; }
.guide-faq .guide-details { border-block-end:1px solid var(--line); padding-block:3px; }
.guide-faq .guide-details:last-of-type { border:0; }
.guide-faq .guide-details[open] { padding-block-end:12px; }
.guide-faq p + p,.guide-details ol + p { margin-block-start:8px; }
.guide-help {
  display:flex; gap:12px; justify-content:space-between; align-items:center;
  border-block-start:1px solid var(--line); margin-block-start:8px; padding-block-start:14px;
}
.guide-help h3 { font-size:1rem; }
.tvdl-site-dialog {
  border:1px solid var(--line); width:min(420px,calc(100% - 30px)); border-radius:18px; padding:22px;
  color:var(--ink); background:#fff;
}
.tvdl-site-dialog::backdrop { background:#052e26aa; }
.tvdl-dialog-close { float:left; border:1px solid var(--line); background:#fff; border-radius:7px; min-height:44px; }
.tvdl-dialog-buttons { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.tvdl-dialog-buttons a,.tvdl-dialog-buttons button { flex:1; }

@media (max-width:760px) {
  .guide-hero { grid-template-columns:minmax(0,1fr); text-align:center; gap:10px; }
  .guide-hero p,.guide-hero picture { margin-inline:auto; }
  .guide-hero picture { max-width:390px; }
}
@media (max-width:445px) {
  .guide-help { align-items:stretch; flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) {
  html:has(.tv-guide) { scroll-behavior:auto; }
}

.guide-display-url {
  display:inline-block; margin-block-start:.3rem;
  color:inherit; font-weight:700; text-underline-offset:3px;
}
.tv-guide p.guide-install-note { margin-block-start:.4rem; }
.guide-install-method {
  margin-block-start:.9rem; padding-block-start:.8rem; border-block-start:1px solid var(--line);
}

.guide-install-options .guide-button-light { border-color:var(--line); }
@media (min-width: 620px) {
  .guide-install-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.guide-mobile-app { display:grid; align-items:center; gap:16px; }
.guide-mobile-copy { display:grid; gap:10px; }
.guide-mobile-copy .guide-button { width:fit-content; }
.guide-mobile-preview { margin:0 auto; width:min(100%,220px); text-align:center; }
.guide-mobile-preview img { border:1px solid var(--line); border-radius:14px; }
.guide-mobile-preview figcaption { margin-top:5px; font-size:.85em; }
@media (min-width:620px) {
  .guide-mobile-app { grid-template-columns:minmax(0,1fr) minmax(160px,220px); }
}
@media (max-width:445px) {
  .guide-mobile-copy .guide-button { width:100%; }
}

.guide-usage-card { display:grid; gap:9px; }
.guide-usage-card .guide-button,
#direct > .guide-button { width:100%; }
.guide-usage-card .guide-button { justify-self:stretch; }
.guide-usage-card .guide-button bdi { margin-inline-start:.35em; }

.guide-download-link { display:flex; gap:8px; align-items:stretch; }
.guide-download-link input { flex:1; min-width:0; padding:8px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:#fff; }
.guide-download-link .guide-button { margin-block:0; border-color:var(--line); }
@media (max-width:480px) {
  .guide-download-link { flex-direction:column; }
}

.tv-guide :is(p,li) { text-wrap:pretty; }
.tv-guide :is(h1,h2,h3,summary,figcaption,.guide-button) { text-wrap:balance; }
@media (max-width:760px) {
  .tv-guide .guide-hero p { max-width:none; }
  .tv-guide .guide-details summary > span { min-width:0; }
  .tv-guide .guide-button { white-space:normal; min-width:0; }
}
