/* Shared Tag detail. Directory styles remain in tag-pages.css. */
.tag-detail {
  --td-blue:#165ddd;
  --td-blue-dark:#0f49ad;
  --td-ink:#14263a;
  --td-muted:#5c6f83;
  --td-line:#dbe5ef;
  --td-soft:#f3f7fb;
  --td-radius:14px;
}
.tag-detail .td-main,.tag-detail .tag-page { color:var(--td-ink); background:#fff; overflow:clip; }
.tag-detail .td-main .container,.tag-detail .tag-page .container { width:min(1180px,calc(100% - 64px)); padding-inline:0; }
.tag-detail :is(.td-main,.tag-page) :is(h1,h2,h3,p,ol) { margin:0; }
.tag-detail :is(.td-main,.tag-page) a { text-decoration:none; }
.tag-detail :is(.td-main,.tag-page) :is(h1,h2,h3,p,a,th,td,summary,li) { overflow-wrap: anywhere; word-break:normal; }
.tag-detail :is(.td-main,.tag-page) h2 { font-size:clamp(25px,2.25vw,34px); font-weight:650; letter-spacing:-.025em; line-height:1.24; }
.tag-detail .td-eyebrow { display:block; margin-bottom:9px; color:var(--td-blue); font-size:11px; font-weight:700; letter-spacing:.13em; }

.tag-detail .td-topic { padding:30px 0 38px; background:linear-gradient(145deg,#fff 20%,#f4f8fd 100%); border-bottom:1px solid var(--td-line); }
.tag-detail .td-breadcrumb { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-bottom:20px; color:var(--td-muted); font-size:12px; }
.tag-detail .td-breadcrumb a { display:inline-flex; align-items:center; min-height:30px; color:inherit; transition:color .2s ease,transform .2s ease; }
.tag-detail .td-breadcrumb a:hover { color:var(--td-blue); transform:translateY(-1px); }
.tag-detail .td-topic h1 { max-width:1000px; margin-bottom:14px; font-size:clamp(36px,4vw,56px); line-height:1.08; letter-spacing:-.042em; font-weight:650; }
.tag-detail .td-answer { max-width:1000px; color:#344d67; font-size:clamp(16px,1.35vw,19px); line-height:1.72; }
.tag-detail .td-brief { display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,230px); gap:28px; align-items:center; margin-top:22px; padding:20px 22px; border:1px solid #d5e2f1; border-left:3px solid var(--td-blue); border-radius:0 var(--td-radius) var(--td-radius) 0; background:rgba(255,255,255,.88); box-shadow:0 10px 28px rgba(20,68,120,.05); }
.tag-detail .td-brief h2 { margin-bottom:6px; font-size:18px; }
.tag-detail .td-brief p { color:#435a72; font-size:13px; line-height:1.7; }
.tag-detail .td-brief .td-boundary { margin-top:8px; color:var(--td-muted); }
.tag-detail .td-boundary strong { display:block; margin-bottom:3px; color:var(--td-ink); font-size:12px; font-weight:700; letter-spacing:.04em; }
.tag-detail .td-actions { display:grid; gap:9px; }
.tag-detail .td-button { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:46px; padding:11px 17px; border:1px solid var(--td-blue); border-radius:8px; color:#fff; background:var(--td-blue); font-size:13px; font-weight:700; text-align:center; transition:color .2s ease,background-color .2s ease,border-color .2s ease,transform .25s ease,box-shadow .25s ease; }
.tag-detail .td-button:hover { color:#fff; background:var(--td-blue-dark); transform:translateY(-2px) scale(1.012); box-shadow:0 10px 22px rgba(13,66,156,.16); }
.tag-detail .td-button--outline { color:var(--td-blue); background:#fff; }
.tag-detail .td-button--outline:hover { color:var(--td-blue); background:#eaf2ff; }
.tag-detail .td-button--light { color:#12243b; background:#fff; border-color:#fff; }
.tag-detail .td-button--light:hover { color:#12243b; background:#e8f1ff; }

.tag-detail :is(.td-decision,.td-resources,.td-articles,.td-faq) { padding:54px 0; border-bottom:1px solid var(--td-line); }
.tag-detail :is(.td-resources,.td-faq) { background:var(--td-soft); }
.tag-detail .td-section-head { display:flex; justify-content:space-between; align-items:end; gap:28px; margin-bottom:24px; }
.tag-detail .td-section-head p { max-width:720px; margin-top:9px; color:var(--td-muted); font-size:13px; line-height:1.7; }
.tag-detail .td-resource-count { flex-shrink:0; color:var(--td-muted); font-size:12px; }

.tag-detail .td-decision-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,.8fr); gap:18px; align-items:start; }
.tag-detail .td-table-scroll { overflow:hidden; border:1px solid var(--td-line); border-radius:var(--td-radius); background:#fff; box-shadow:0 8px 24px rgba(20,68,120,.05); }
.tag-detail .td-table-scroll:focus-visible { outline:3px solid #6fb7ff; outline-offset:3px; }
.tag-detail .td-table-scroll table { width:100%; border-collapse:collapse; table-layout:fixed; }
.tag-detail .td-table-scroll :is(th,td) { padding:14px 15px; border-bottom:1px solid #e5edf5; text-align:start; vertical-align:top; font-size:13px; line-height:1.65; }
.tag-detail .td-table-scroll thead th { color:#173c5c; background:#edf4fb; font-weight:700; }
.tag-detail .td-table-scroll tbody th { width:22%; color:#173c5c; font-weight:650; }
.tag-detail .td-table-scroll tbody tr:last-child :is(th,td) { border-bottom:0; }
.tag-detail .td-checklist { margin:0; padding:21px; border:1px solid #d5e2f1; border-radius:var(--td-radius); background:#f3f7fb; }
.tag-detail .td-checklist h3 { margin:0 0 13px; font-size:17px; }
.tag-detail .td-checklist ul { display:grid; gap:10px; margin:0; padding-inline-start:20px; }
.tag-detail .td-checklist li { color:#435a72; font-size:13px; line-height:1.62; }

.tag-detail .td-reading-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tag-detail .td-reading { display:block; min-width:0; padding:20px; border:1px solid var(--td-line); border-radius:12px; color:var(--td-ink); background:#fff; transition:color .2s ease,background-color .2s ease,border-color .2s ease,transform .25s ease,box-shadow .25s ease; animation:td-enter .42s ease backwards; }
.tag-detail .td-reading--fixed { border-left:3px solid var(--td-blue); background:#eef4fe; }
.tag-detail .td-reading-kind { display:block; margin-bottom:8px; color:var(--td-blue); font-size:11px; font-weight:700; letter-spacing:.07em; }
.tag-detail .td-reading h3 { font-size:17px; font-weight:650; line-height:1.48; }
.tag-detail .td-reading p { margin-top:7px; color:var(--td-muted); font-size:13px; line-height:1.7; }
.tag-detail .td-reading small { display:block; margin-top:8px; color:#657b91; font-size:11px; line-height:1.6; }
.tag-detail .td-arrow { display:none; }
.tag-detail .td-reading:hover { color:var(--td-ink); border-color:#91b6e9; background:#f8fbff; transform:translateY(-3px); box-shadow:0 12px 26px rgba(20,68,120,.09); }
.tag-detail .td-article-empty { grid-column:1/-1; padding:22px; border:1px dashed #c8d8e7; border-radius:12px; color:var(--td-muted); font-size:13px; }
.tag-detail .td-pagination { margin-top:22px; }
.tag-detail .td-related-topics { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-top:24px; padding-top:20px; border-top:1px solid var(--td-line); }
.tag-detail .td-related-topics strong { color:#173c5c; font-size:13px; }
.tag-detail .td-related-topics > div,.tag-detail .td-tag-links { display:flex; flex-wrap:wrap; gap:8px; }
.tag-detail .td-related-topics a,.tag-detail .td-tag-links a { display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:8px 12px; border:1px solid #cbddec; border-radius:100px; color:#145d9c; background:#fff; font-size:12px; transition:color .2s ease,background-color .2s ease,border-color .2s ease,transform .22s ease; }
.tag-detail .td-related-topics a:hover,.tag-detail .td-tag-links a:hover { border-color:#357fbe; background:#eef6ff; transform:translateY(-2px); }

.tag-detail .td-faq-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.tag-detail .td-faq details { align-self:start; padding:0 18px; border:1px solid #d8e4ef; border-radius:12px; background:#fff; transition:border-color .22s ease,box-shadow .22s ease,transform .22s ease; }
.tag-detail .td-faq details[open] { border-color:#90bce2; box-shadow:0 10px 24px rgba(15,58,102,.07); }
.tag-detail .td-faq summary { padding:17px 0; cursor:pointer; color:#173c5c; font-size:14px; font-weight:700; }
.tag-detail .td-faq details p { padding:0 0 18px; color:#566b7e; font-size:13px; line-height:1.72; }
.tag-detail .td-faq details:hover { transform:translateY(-2px); }

.tag-detail .td-capability { padding:30px 0; background:#fff; border-bottom:1px solid var(--td-line); }
.tag-detail .td-capability .container { display:grid; grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr); align-items:center; gap:28px; }
.tag-detail .td-capability-copy h2 { font-size:22px; }
.tag-detail .td-capability-copy p { margin-top:7px; color:var(--td-muted); font-size:13px; line-height:1.65; }
.tag-detail .td-capability-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.tag-detail .td-capability-links a { display:grid; grid-template-columns:22px minmax(0,1fr) 14px; gap:9px; align-items:center; min-height:54px; padding:11px 13px; border:1px solid var(--td-line); border-radius:10px; color:#23415f; background:#f8fbff; font-size:13px; font-weight:650; transition:color .2s ease,background-color .2s ease,border-color .2s ease,transform .24s ease,box-shadow .24s ease; }
.tag-detail .td-capability-links svg { width:20px; height:20px; color:var(--td-blue); }
.tag-detail .td-capability-links b { color:var(--td-blue); font-size:14px; }
.tag-detail .td-capability-links a:hover { color:var(--td-blue); border-color:#8cb4e8; background:#fff; transform:translateY(-2px); box-shadow:0 8px 20px rgba(20,68,120,.08); }

.tag-detail .td-closing { padding:40px 0 calc(40px + env(safe-area-inset-bottom)); color:#fff; background:#112b4c; }
.tag-detail .td-closing .container { display:flex; align-items:center; justify-content:space-between; gap:35px; }
.tag-detail .td-closing .td-eyebrow { color:#a4c9ff; }
.tag-detail .td-closing p { margin-top:10px; max-width:780px; color:#c3d2e5; font-size:13px; line-height:1.7; }
.tag-detail .td-closing .td-button { flex-shrink:0; }
.tag-detail :is(.td-button,.td-reading,.td-related-topics a,.td-tag-links a,.td-capability-links a):active { transform:scale(.985); }
.tag-detail .global-enquiry { display:none; }
.tag-detail :is(.td-main,.tag-page) > section { animation:td-enter .42s ease both; }
@keyframes td-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
::view-transition-old(root) { animation:td-exit .18s ease both; }
::view-transition-new(root) { animation:td-enter .24s ease both; }
@keyframes td-exit { to { opacity:0; transform:translateY(-7px); } }

@media(max-width:900px) {
  .tag-detail .td-main .container,.tag-detail .tag-page .container { width:min(100% - 40px,1180px); }
  .tag-detail .td-decision-grid { grid-template-columns:1fr; }
  .tag-detail .td-checklist ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tag-detail .td-capability .container { grid-template-columns:1fr; gap:18px; }
}
@media(max-width:760px) {
  .tag-detail .td-main .container,.tag-detail .tag-page .container { width:calc(100% - 32px); }
  .tag-detail .td-topic { padding:22px 0 30px; }
  .tag-detail .td-breadcrumb { gap:7px; margin-bottom:16px; }
  .tag-detail .td-topic h1 { font-size:clamp(29px,8vw,38px); letter-spacing:-.025em; }
  html:lang(ru) .tag-detail .td-topic h1 { font-size:clamp(27px,7.2vw,34px); letter-spacing:-.012em; hyphens:auto; overflow-wrap: anywhere; }
  .tag-detail .td-answer { font-size:16px; line-height:1.65; }
  .tag-detail .td-brief { grid-template-columns:1fr; gap:16px; margin-top:18px; padding:18px 16px; }
  .tag-detail .td-actions { grid-template-columns:1fr; }
  .tag-detail :is(.td-decision,.td-resources,.td-articles,.td-faq) { padding:38px 0; }
  .tag-detail .td-section-head { display:block; margin-bottom:19px; }
  .tag-detail .td-resource-count { display:block; margin-top:10px; }
  .tag-detail .td-table-scroll { overflow:visible; border:0; border-radius:0; box-shadow:none; background:transparent; }
  .tag-detail .td-table-scroll table,.tag-detail .td-table-scroll tbody,.tag-detail .td-table-scroll tr,.tag-detail .td-table-scroll :is(th,td) { display:block; box-sizing:border-box; width:100%; min-width:0; }
  .tag-detail .td-table-scroll thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  .tag-detail .td-table-scroll tbody { display:grid; gap:10px; }
  .tag-detail .td-table-scroll tr { padding:5px 15px 13px; border:1px solid var(--td-line); border-radius:12px; background:#fff; box-shadow:0 6px 18px rgba(20,68,120,.045); }
  .tag-detail .td-table-scroll :is(th,td) { padding:10px 0 0; border:0; font-size:13px; }
  .tag-detail .td-table-scroll :is(th,td)::before { content:attr(data-label); display:block; margin-bottom:2px; color:var(--td-blue); font-size:10px; font-weight:750; letter-spacing:.06em; text-transform:uppercase; }
  .tag-detail .td-checklist { padding:18px; }
  .tag-detail .td-checklist ul { grid-template-columns:1fr; }
  .tag-detail .td-reading-list { grid-template-columns:1fr; }
  .tag-detail .td-reading { padding:18px; }
  .tag-detail .td-reading h3 { font-size:16px; }
  .tag-detail .td-faq-list { grid-template-columns:1fr; }
  .tag-detail .td-related-topics { align-items:flex-start; flex-direction:column; }
  .tag-detail .td-capability { padding:26px 0; }
  .tag-detail .td-capability-links { grid-template-columns:1fr; }
  .tag-detail .td-capability-links a { min-height:48px; }
  .tag-detail .td-closing { padding:32px 0 calc(96px + env(safe-area-inset-bottom)); }
  .tag-detail .td-closing .container { display:grid; gap:21px; }
  .tag-detail .td-closing h2 { font-size:25px; }
}
@media(prefers-reduced-motion:reduce) {
  .tag-detail *,::view-transition-old(root),::view-transition-new(root) { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
