/* Uproger homepage. All selectors are scoped to the home template. */
body.uproger-home{--uh-bg:#f1f2f6;--uh-surface:#fff;--uh-text:#22242b;--uh-muted:#656c79;--uh-menu-text:#59616f;--uh-line:#e5e6eb;--uh-control:#f1f2f6;--uh-accent:#5147ea;--uh-shadow:0 1px 3px rgba(22,24,42,.025);margin:0!important;background:var(--uh-bg)!important;color:var(--uh-text)!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;font-size:15px;line-height:1.45}
html[data-u-theme="dark"] body.uproger-home{--uh-bg:#101114;--uh-surface:#1c1e23;--uh-text:#eff0f4;--uh-muted:#9299a8;--uh-menu-text:var(--uh-muted);--uh-line:#303239;--uh-control:#292b31;--uh-accent:#8b82ff;--uh-shadow:none}
@media(prefers-color-scheme:dark){html:not([data-u-theme="light"]) body.uproger-home{--uh-bg:#101114;--uh-surface:#1c1e23;--uh-text:#eff0f4;--uh-muted:#9299a8;--uh-menu-text:var(--uh-muted);--uh-line:#303239;--uh-control:#292b31;--uh-accent:#8b82ff;--uh-shadow:none}}
.uproger-home *, .uproger-home *::before,.uproger-home *::after{box-sizing:border-box}
.uproger-home a{color:inherit;text-decoration:none}.uproger-home svg{display:block;width:20px;height:20px;flex:none}.uproger-home button,.uproger-home input{font:inherit}.uproger-home button{cursor:pointer}.uproger-home a:focus-visible,.uproger-home button:focus-visible,.uproger-home summary:focus-visible,.uproger-home input:focus-visible{outline:2px solid var(--uh-accent);outline-offset:3px}
.uproger-home .uh-sr-only,.uproger-home .screen-reader-text{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.uproger-home .uh-skip{position:fixed;left:12px;top:-80px;z-index:1000;padding:12px;background:var(--uh-surface);border:1px solid var(--uh-line)}.uproger-home .uh-skip:focus{top:12px}
.uproger-home .uh-header{height:72px;background:var(--uh-surface);border-bottom:1px solid var(--uh-line);position:sticky;top:0;z-index:90}
.uproger-home .uh-header-inner{max-width:1590px;height:100%;padding:0 30px;margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr) auto;align-items:center;gap:28px}
.uproger-home .uh-brand{font-size:29px;font-weight:850;line-height:1;letter-spacing:-2px;display:inline-flex;align-items:center;width:max-content;color:var(--uh-text)}
.uproger-home .uh-brand-mark{font-weight:950;background:linear-gradient(145deg,#fb7f76 15%,#b74799 58%,#7151dc);-webkit-background-clip:text;background-clip:text;color:transparent}
.uproger-home .uh-search{position:relative;max-width:700px;width:100%;display:flex;align-items:center;background:var(--uh-control);border:1px solid transparent;border-radius:12px;padding:0 14px;gap:10px;color:var(--uh-muted);height:43px;margin:0}
.uproger-home .uh-search:focus-within{border-color:var(--uh-accent)}.uproger-home .uh-search input{background:transparent!important;border:0!important;box-shadow:none!important;outline:0!important;padding:0!important;height:100%!important;width:100%;color:var(--uh-text)!important;font-size:14px}.uproger-home .uh-search input::placeholder{color:var(--uh-muted)}
.uproger-home .uh-header-actions{display:flex;align-items:center;gap:12px}.uproger-home .uh-theme,.uproger-home .uh-menu-toggle{display:grid;place-items:center;width:42px;height:42px;padding:0!important;border:1px solid var(--uh-line)!important;border-radius:12px;background:transparent!important;color:var(--uh-text)!important}.uproger-home .uh-write{display:flex;align-items:center;gap:8px;background:var(--uh-text);color:var(--uh-surface);border-radius:12px;padding:11px 16px;font-size:14px;font-weight:650;white-space:nowrap}.uproger-home .uh-write svg{width:17px;height:17px}.uproger-home .uh-menu-toggle{display:none}
.uproger-home .uh-layout{max-width:1590px;margin:0 auto;padding:28px 30px 50px;display:grid;grid-template-columns:220px minmax(0,1fr) 300px;gap:28px;align-items:start}.uproger-home .uh-layout>*{min-width:0}
.uproger-home .uh-nav{position:sticky;top:100px;max-height:calc(100vh - 112px);overflow:auto;scrollbar-width:thin}.uproger-home .uh-nav-title{color:var(--uh-muted);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:9px 10px 13px}.uproger-home .uh-nav-list{display:flex;flex-direction:column;gap:5px}.uproger-home .uh-nav-link{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 10px;border-radius:12px;color:var(--uh-menu-text);font-weight:400;list-style:none;cursor:pointer}.uproger-home .uh-nav-link::-webkit-details-marker{display:none}.uproger-home .uh-nav-link:hover,.uproger-home .uh-nav-link.is-current{background:var(--uh-surface);color:var(--uh-text)}.uproger-home .uh-nav-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--uh-surface);color:var(--uh-muted);flex:none}.uproger-home .uh-nav-link.is-current .uh-nav-icon{background:var(--uh-control);color:var(--uh-accent)}.uproger-home .uh-chevron{margin-left:auto}.uproger-home .uh-subnav{display:flex;flex-direction:column;gap:2px;padding:0 0 5px 58px}.uproger-home .uh-subnav a{padding:6px 0;font-size:14px;font-weight:400;color:var(--uh-menu-text)}.uproger-home .uh-subnav a:hover{color:var(--uh-accent)}.uproger-home .uh-nav-footer{border-top:1px solid var(--uh-line);margin:25px 10px 0;padding-top:21px;color:var(--uh-muted);font-size:12px}.uproger-home .uh-nav-footer span{font-size:11px;font-weight:800;letter-spacing:.12em}.uproger-home .uh-nav-footer p{margin:8px 0 14px;line-height:1.5}.uproger-home .uh-nav-footer a{display:flex;align-items:center;gap:5px;font-weight:650;color:var(--uh-text)}.uproger-home .uh-nav-footer a svg{width:15px;height:15px}
.uproger-home .uh-feed-head{display:flex;align-items:end;justify-content:space-between;gap:15px;padding:8px 2px 22px}.uproger-home .uh-eyebrow{display:flex;gap:7px;align-items:center;font-size:10px;font-weight:750;letter-spacing:.1em;color:var(--uh-muted)}.uproger-home .uh-eyebrow span{width:6px;height:6px;border-radius:50%;background:#7c71ef}.uproger-home .uh-feed-head h1{font-size:31px;letter-spacing:-.04em;line-height:1.1;margin:10px 0 6px;color:var(--uh-text);font-weight:750}.uproger-home .uh-feed-head p{font-size:14px;color:var(--uh-muted);margin:0}.uproger-home .uh-feed-badge{white-space:nowrap;background:var(--uh-surface);border:1px solid var(--uh-line);border-radius:9px;color:var(--uh-muted);font-size:12px;padding:8px 12px}
.uproger-home .uh-feed-tabs{display:flex;align-items:center;gap:24px;border-bottom:1px solid var(--uh-line);margin-bottom:18px;color:var(--uh-muted);font-size:13px}.uproger-home .uh-feed-tabs span{padding:0 0 12px}.uproger-home .uh-feed-tabs .is-active{font-weight:700;color:var(--uh-text);position:relative}.uproger-home .uh-feed-tabs .is-active::after{content:"";height:2px;background:var(--uh-accent);position:absolute;bottom:-1px;left:0;right:0}
.uproger-home .uh-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}.uproger-home .uh-card{display:flex;flex-direction:column;background:var(--uh-surface);border:1px solid var(--uh-line);border-radius:20px;overflow:hidden;box-shadow:var(--uh-shadow);min-width:0;padding:14px!important;margin:0!important}.uproger-home .uh-card-media{display:flex;position:relative;aspect-ratio:1.78;overflow:hidden;border-radius:13px;background:#292f44;color:#fff}.uproger-home .uh-card-media img{width:100%;height:100%;object-fit:cover;transition:transform .25s}.uproger-home .uh-card:hover .uh-card-media img{transform:scale(1.025)}
.uproger-home .uh-card-media.is-placeholder{background:radial-gradient(circle at 78% 20%,rgba(131,115,255,.48),transparent 28%),linear-gradient(135deg,#202339,#343259 65%,#23283f);padding:16px;flex-direction:column;justify-content:space-between}.uproger-home .uh-placeholder-top{font-size:10px;letter-spacing:.13em;font-weight:750;opacity:.75}.uproger-home .uh-placeholder-top span{color:#bcb3ff}.uproger-home .uh-placeholder-code{position:absolute;font-size:clamp(40px,6vw,85px);font-weight:800;letter-spacing:-.09em;right:10%;top:20%;color:rgba(255,255,255,.22)}.uproger-home .uh-placeholder-topic{font-size:clamp(20px,2vw,32px);letter-spacing:-.04em;line-height:1.1;font-weight:750;max-width:70%}
.uproger-home .uh-card-body{display:flex;flex:1;flex-direction:column;padding:15px 3px 1px}.uproger-home .uh-card-meta{display:flex;align-items:center;gap:7px;color:var(--uh-muted);font-size:12px;white-space:nowrap;overflow:hidden}.uproger-home .uh-card-avatar{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#eeeafb;color:#6d52de;font-size:20px;line-height:1;font-weight:850}.uproger-home .uh-card-category{color:var(--uh-text);font-weight:650;overflow:hidden;text-overflow:ellipsis}.uproger-home .uh-card h2{font-size:19px;line-height:1.25;font-weight:720;letter-spacing:-.025em;margin:15px 0 8px;color:var(--uh-text)}.uproger-home .uh-card h2 a:hover{color:var(--uh-accent)}.uproger-home .uh-card-excerpt{font-size:14px;line-height:1.5;color:var(--uh-muted);margin:0 0 20px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.uproger-home .uh-card-bottom{margin-top:auto;padding-top:13px;border-top:1px solid var(--uh-line);display:flex;align-items:center;justify-content:space-between;color:var(--uh-muted);font-size:12px}.uproger-home .uh-read,.uproger-home .uh-comments{display:flex;align-items:center;gap:5px}.uproger-home .uh-read svg,.uproger-home .uh-comments svg{width:16px;height:16px}.uproger-home .uh-comments:hover{color:var(--uh-accent)}
.uproger-home .uh-sidebar{position:relative;display:block!important;width:auto!important;max-width:none!important;margin:0!important}.uproger-home .uh-sidebar .widget{background:var(--uh-surface)!important;border:1px solid var(--uh-line)!important;border-radius:20px!important;margin:0 0 16px!important;padding:20px!important;color:var(--uh-text)!important;box-shadow:var(--uh-shadow)}.uproger-home .uh-sidebar .widget_custom_html:has(#uproger-category-helper-20261110){display:none!important}.uproger-home .uh-sidebar .widget-title{color:var(--uh-text)!important}.uproger-home .uh-sidebar .widget_categories ul{display:flex;flex-wrap:wrap;gap:7px;margin:0;padding:0;list-style:none}.uproger-home .uh-sidebar .widget_categories li{margin:0!important}.uproger-home .uh-sidebar .widget_categories .u-categories-toggle{color:var(--uh-text)!important}.uproger-home .uh-sidebar iframe,.uproger-home .uh-sidebar img{max-width:100%}
.uproger-home .uh-pagination{margin:25px 0}.uproger-home .uh-pagination .nav-links{display:flex;flex-wrap:wrap;gap:8px}.uproger-home .uh-pagination .page-numbers{display:grid;place-items:center;min-width:38px;min-height:38px;padding:0 12px;border-radius:10px;background:var(--uh-surface);border:1px solid var(--uh-line);font-size:13px}.uproger-home .uh-pagination .page-numbers.current{background:var(--uh-text);color:var(--uh-surface)}.uproger-home .uh-empty{padding:30px;border-radius:20px;background:var(--uh-surface)}.uproger-home .uh-footer{border-top:1px solid var(--uh-line);padding:25px 30px;text-align:center;color:var(--uh-muted);font-size:12px}.uproger-home .uh-footer span{margin:0 6px}
@media(max-width:1250px){.uproger-home .uh-layout{grid-template-columns:190px minmax(0,1fr) 270px;gap:18px}.uproger-home .uh-header-inner{grid-template-columns:190px minmax(0,1fr) auto;gap:18px}.uproger-home .uh-card h2{font-size:17px}}
@media(max-width:1020px){.uproger-home .uh-layout{grid-template-columns:190px minmax(0,1fr)}.uproger-home .uh-sidebar{grid-column:2}.uproger-home .uh-sidebar .widget{max-width:none}.uproger-home .uh-feed-badge{display:none}}
@media(max-width:700px){.uproger-home .uh-header{height:64px}.uproger-home .uh-header-inner{padding:0 16px;grid-template-columns:auto minmax(0,1fr) auto;gap:12px}.uproger-home .uh-brand{font-size:25px}.uproger-home .uh-search{height:40px;padding:0 10px}.uproger-home .uh-search input{font-size:13px}.uproger-home .uh-header-actions{gap:6px}.uproger-home .uh-theme{width:40px;height:40px}.uproger-home .uh-write{display:none}.uproger-home .uh-menu-toggle{display:grid;width:40px;height:40px}.uproger-home .uh-layout{display:flex;flex-direction:column;padding:20px 14px 35px;gap:18px}.uproger-home .uh-main,.uproger-home .uh-sidebar{width:100%}.uproger-home .uh-nav{display:none;position:fixed;top:64px;left:0;right:0;bottom:0;max-height:none;background:var(--uh-bg);padding:14px 16px 35px;z-index:89}.uproger-home .uh-nav.is-open{display:block}.uproger-home .uh-feed-head{padding:4px 2px 18px}.uproger-home .uh-feed-head h1{font-size:28px}.uproger-home .uh-feed-head p{font-size:13px}.uproger-home .uh-cards{grid-template-columns:1fr;gap:14px}.uproger-home .uh-card{padding:12px!important;border-radius:17px}.uproger-home .uh-card h2{font-size:18px}.uproger-home .uh-card-media{aspect-ratio:1.8}.uproger-home .uh-placeholder-code{font-size:70px}.uproger-home .uh-placeholder-topic{font-size:26px}.uproger-home .uh-sidebar{margin-top:10px!important}.uproger-home .uh-footer{padding:20px 16px}}
@media(max-width:390px){.uproger-home .uh-search input::placeholder{color:transparent}.uproger-home .uh-header-inner{gap:7px}.uproger-home .uh-header-actions{gap:4px}}
@media(prefers-reduced-motion:reduce){.uproger-home .uh-card-media img{transition:none}}
/* Preserve branding and override theme-wide body colors on the new homepage. */
html[data-u-theme] body.uproger-home,html:not([data-u-theme]) body.uproger-home{background:var(--uh-bg)!important;color:var(--uh-text)!important}
.uproger-home .uh-brand img{display:block;width:145px;height:auto;max-height:38px;object-fit:contain;object-position:left center}
html[data-u-theme="dark"] .uproger-home .uh-brand img{filter:invert(1) hue-rotate(180deg)}
@media(prefers-color-scheme:dark){html:not([data-u-theme="light"]) .uproger-home .uh-brand img{filter:invert(1) hue-rotate(180deg)}}
.uproger-home .uh-nav-link{font-size:14px}.uproger-home .uh-nav-link>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.uproger-home .uh-nav-publish{display:none}
.uproger-home .uh-feed-head h1{font-size:25px;max-width:560px}
@media(max-width:700px){.uproger-home .uh-brand img{width:115px;height:auto}.uproger-home .uh-nav-publish{display:flex}.uproger-home .uh-feed-head h1{font-size:24px}}
/* Keep long navigation labels on a single line. */
@media(min-width:1251px){.uproger-home .uh-layout{grid-template-columns:240px minmax(0,1fr) 300px}.uproger-home .uh-header-inner{grid-template-columns:240px minmax(0,1fr) auto}}
@media(min-width:701px) and (max-width:1250px){.uproger-home .uh-layout{grid-template-columns:205px minmax(0,1fr) 270px}.uproger-home .uh-header-inner{grid-template-columns:205px minmax(0,1fr) auto}}
@media(min-width:701px) and (max-width:1020px){.uproger-home .uh-layout{grid-template-columns:205px minmax(0,1fr)}}
.uproger-home .uh-nav-link{font-size:14px}.uproger-home .uh-nav-link>span:nth-child(2){white-space:nowrap;overflow-wrap:normal}
/* Hide the selected resource only in the redesigned homepage preview. */
.uproger-home .uh-sidebar #uproger-resource-hub a.ur-card[href="https://t.me/pythonlbooks"]{display:none!important}

/* Keep resource addresses on one line, truncating only when needed. */
.uproger-home .uh-sidebar #uproger-resource-hub .ur-card .ur-description {
  flex: 1 1 0;
  min-width: 0;
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-card .ur-description > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px !important;
}
.uproger-home .uh-read:hover{color:var(--uh-accent)}
.uproger-home .uh-views{display:inline-flex;align-items:center;gap:5px;font-variant-numeric:tabular-nums}
.uproger-home .uh-views svg{width:16px;height:16px}
/* Feed ordering control: plain label with a keyboard-accessible menu. */
.uproger-home .uh-feed-head{padding-bottom:16px}
.uproger-home .uh-feed-head h1{margin-top:0}
.uproger-home .uh-feed-controls{margin:0 0 9px}
.uproger-home .uh-sort{position:relative;width:max-content;max-width:100%}
.uproger-home .uh-sort summary{display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;padding:2px 0;list-style:none;cursor:pointer;color:var(--uh-text);font-size:14px;font-weight:600}
.uproger-home .uh-sort summary::-webkit-details-marker{display:none}
.uproger-home .uh-sort summary svg{width:16px;height:16px;transition:transform .18s}
.uproger-home .uh-sort[open] summary svg{transform:rotate(180deg)}
.uproger-home .uh-sort-options{position:absolute;z-index:15;top:calc(100% + 8px);left:0;min-width:200px;padding:6px;border:1px solid var(--uh-line);border-radius:12px;background:var(--uh-surface);box-shadow:0 10px 28px rgba(0,0,0,.14)}
.uproger-home .uh-sort-options a{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:9px 11px;border-radius:8px;color:var(--uh-text);font-size:13px;white-space:nowrap}
.uproger-home .uh-sort-options a:hover,.uproger-home .uh-sort-options a[aria-current="true"]{background:var(--uh-control)}
.uproger-home .uh-sort-options a span{color:var(--uh-accent);font-weight:700}
@media(prefers-reduced-motion:reduce){.uproger-home .uh-sort summary svg{transition:none}}
.uproger-home .uh-nav-footer .uh-socials{display:flex;align-items:center;gap:6px;margin:14px 0 0 -8px}
.uproger-home .uh-nav-footer .uh-socials a{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--uh-muted)}
.uproger-home .uh-nav-footer .uh-socials a:hover{background:var(--uh-surface);color:var(--uh-accent)}
.uproger-home .uh-nav-footer .uh-socials svg{width:20px;height:20px;fill:currentColor}

/* Align the feed sorter and its menu to the right edge. */
.uproger-home .uh-feed-controls{display:flex;justify-content:flex-end}
.uproger-home .uh-sort-options{left:auto;right:0}

/* Separate adjacent highlighted options. */
.uproger-home .uh-sort-options{display:flex;flex-direction:column;gap:4px}

/* Keep featured channel names on a single line. */
.uproger-home .uh-sidebar #uproger-resource-hub .ur-card .ur-description > strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 400;
}

/* Give the complete widget heading room alongside its disclosure arrow. */
@media (min-width:1251px) {
  .uproger-home .uh-layout { grid-template-columns:240px minmax(0,1fr) 320px; }
}
@media (min-width:1021px) and (max-width:1250px) {
  .uproger-home .uh-layout { grid-template-columns:205px minmax(0,1fr) 300px; }
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-heading { gap:8px; }
.uproger-home .uh-sidebar #uproger-resource-hub .ur-heading > span:first-child {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  letter-spacing:-.03em;
}

@media (min-width:1021px) and (max-width:1250px) {
  .uproger-home .uh-sidebar #uproger-resource-hub .ur-heading > span:first-child { font-size:12px; letter-spacing:-.04em; }
}

/* Keep the disclosure arrow centered while its direction changes. */
.uproger-home .uh-sidebar #uproger-resource-hub .ur-heading .ur-chevron {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  width:16px;
  height:24px;
  font-size:0;
  line-height:0;
  transform:none !important;
  transition:none;
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-heading .ur-chevron::before {
  content:"";
  display:block;
  box-sizing:border-box;
  width:7px;
  height:7px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
  transform-origin:center;
  transition:transform .2s ease;
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-toggle:checked ~ .ur-heading .ur-chevron::before {
  transform:rotate(225deg);
}
@media (prefers-reduced-motion:reduce) {
  .uproger-home .uh-sidebar #uproger-resource-hub .ur-heading .ur-chevron::before { transition:none; }
}

/* Keep the category button text-only in both states. */
.uproger-home .uh-sidebar .widget_categories .u-categories-toggle::after {content:none!important;}

/* Compensate for the lowercase glyph's baseline inside the square avatar. */
.uproger-home .uh-card-avatar { box-sizing:border-box; padding-bottom:3px; }

/* The channels heading is informational; the full-list button controls expansion. */
.uproger-home .uh-sidebar #uproger-resource-hub h2.ur-heading {
  margin:0;
  cursor:default;
  line-height:1.3;
}
.uproger-home .uh-sidebar #uproger-resource-hub h2.ur-heading > span:first-child {
  font-size:19px;
  font-weight:700;
  letter-spacing:normal;
}
@media (min-width:1021px) and (max-width:1250px) {
  .uproger-home .uh-sidebar #uproger-resource-hub h2.ur-heading > span:first-child {letter-spacing:-.015em;}
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-toggle:focus-visible + h2.ur-heading {
  outline:none;
}
.uproger-home .uh-sidebar #uproger-resource-hub .ur-toggle:focus-visible ~ label.ur-open {
  outline:2px solid #5145e7;
  outline-offset:3px;
}

/* Keep the submenu chevron centered and rotate it in place. */
.uproger-home .uh-nav-group .uh-chevron {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  width:16px;
  height:16px;
}
.uproger-home .uh-nav-group .uh-chevron svg {
  display:block;
  width:16px;
  height:16px;
  transform:rotate(0deg);
  transform-origin:center;
  transition:transform .2s ease;
}
.uproger-home .uh-nav-group[open] .uh-chevron svg {transform:rotate(180deg);}
@media (prefers-reduced-motion:reduce) {
  .uproger-home .uh-nav-group .uh-chevron svg {transition:none;}
}

/* Mobile feed sorting alignment. */
@media (max-width: 700px) {
  .uproger-home .uh-feed-controls { justify-content: flex-start; }
  .uproger-home .uh-sort-options { left: 0; right: auto; }
}

/* Compact navigation without shrinking the SVG icons. */
.uproger-home .uh-nav-list { gap: 3px; }
.uproger-home .uh-nav-link { min-height: 44px; padding: 6px 10px; }
.uproger-home .uh-nav-icon { width: 32px; height: 32px; border-radius: 9px; }
.uproger-home .uh-subnav { padding-left: 54px; }

/* Feed view selector and one-column list mode. */
.uproger-home .uh-feed-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.uproger-home .uh-view-switch[hidden], .uproger-home .uh-card-reading[hidden] { display:none !important; }
.uproger-home .uh-view-switch { display:flex; align-items:center; gap:8px; flex:none; color:var(--uh-muted); font-size:13px; font-weight:600; }
.uproger-home .uh-view-options { display:flex; gap:2px; padding:3px; border:1px solid var(--uh-line); border-radius:10px; background:var(--uh-surface); }
.uproger-home .uh-view-button { display:grid; place-items:center; width:32px; height:32px; padding:0 !important; border:0 !important; border-radius:7px; background:transparent !important; color:var(--uh-muted) !important; }
.uproger-home .uh-view-button svg { width:18px; height:18px; }
.uproger-home .uh-view-button:hover { color:var(--uh-text) !important; background:var(--uh-control) !important; }
.uproger-home .uh-view-button[aria-pressed="true"] { color:var(--uh-text) !important; background:var(--uh-control) !important; }
.uproger-home .uh-sort { margin-left:auto; flex:none; }
.uproger-home .uh-card-reading { display:inline-flex; align-items:center; gap:6px; margin:0 0 12px; color:var(--uh-muted); font-size:12px; line-height:1.4; }
.uproger-home .uh-card-reading svg { width:15px; height:15px; }
html[data-u-feed-view="list"] .uproger-home .uh-cards { grid-template-columns:minmax(0,1fr); }
html[data-u-feed-view="list"] .uproger-home .uh-card-excerpt { margin-bottom:12px; }
html[data-u-feed-view="list"] .uproger-home .uh-cards .uh-card-bottom { border-top:0; }
@media (min-width:701px) {
  html[data-u-feed-view="list"] .uproger-home .uh-card { display:grid; grid-template-columns:minmax(0,38%) minmax(0,1fr); gap:18px; align-items:stretch; }
  html[data-u-feed-view="list"] .uproger-home .uh-card-media { width:100%; height:100%; min-height:190px; aspect-ratio:auto; }
  html[data-u-feed-view="list"] .uproger-home .uh-card-body { min-width:0; padding:3px 3px 1px; }
}
@media (max-width:700px) {
  .uproger-home .uh-sort-options { left:auto; right:0; }
  html[data-u-feed-view="list"] .uproger-home .uh-card-media { aspect-ratio:2.1; }
}
@media (max-width:319px) { .uproger-home .uh-feed-controls { flex-wrap:wrap; } }

/* Hide the view selector on phones. */
@media (max-width: 700px) {
  .uproger-home .uh-view-switch { display: none !important; }
  .uproger-home .uh-feed-controls { justify-content: flex-start; }
  .uproger-home .uh-sort { margin-left: 0; }
  .uproger-home .uh-sort-options { left: 0; right: auto; }
}

/* Category introduction occupies the full feed column. */
.uproger-category-archive .uh-category-intro {
  width:100%;
  margin:0 0 22px;
  padding:24px;
  border:1px solid var(--uh-line);
  border-radius:20px;
  background:var(--uh-surface);
  box-shadow:var(--uh-shadow);
}
.uproger-category-archive .uh-category-breadcrumbs { color:var(--uh-muted); font-size:12px; }
.uproger-category-archive .uh-category-breadcrumbs ol { display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; list-style:none; }
.uproger-category-archive .uh-category-breadcrumbs li { display:inline-flex; align-items:center; gap:6px; margin:0; }
.uproger-category-archive .uh-category-breadcrumbs li > span { display:inline-flex; }
.uproger-category-archive .uh-category-breadcrumbs svg { width:12px; height:12px; transform:rotate(-90deg); }
.uproger-category-archive .uh-category-breadcrumbs a:hover { color:var(--uh-accent); }
.uproger-category-archive .uh-category-intro h1 { margin:14px 0 12px; color:var(--uh-text); font-size:30px; font-weight:750; line-height:1.15; letter-spacing:-.035em; }
.uproger-category-archive .uh-category-description { max-width:76ch; color:var(--uh-muted); font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.uproger-category-archive .uh-category-description p { margin:0 0 10px; }
.uproger-category-archive .uh-category-description > :last-child { margin-bottom:0; }
.uproger-category-archive .uh-category-description a { color:var(--uh-accent); }
.uproger-category-archive .uh-subnav a[aria-current="page"] { color:var(--uh-accent); font-weight:400; }
@media (min-width:701px) {
  html[data-u-feed-view="list"] .uproger-category-archive .uh-card-media { height:auto; }
  html[data-u-feed-view="list"] .uproger-category-archive .uh-card-media img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
}
@media (max-width:700px) {
  .uproger-category-archive .uh-category-intro { padding:18px; border-radius:17px; margin-bottom:18px; }
  .uproger-category-archive .uh-category-intro h1 { font-size:26px; }
}

/* Card footer: views and reading time on the left, article link on the right. */
.uproger-home .uh-card-bottom { gap:12px; flex-wrap:wrap; }
.uproger-home .uh-card-stats { display:flex; align-items:center; flex-wrap:wrap; gap:14px; min-width:0; }
.uproger-home .uh-card-bottom .uh-card-reading { margin:0; white-space:nowrap; }
.uproger-home .uh-card-bottom .uh-views { white-space:nowrap; }
.uproger-home .uh-card-bottom .uh-read { margin-left:auto; flex:none; white-space:nowrap; }
@media (max-width:1179px) {
  .uproger-home .uh-card-stats { gap:10px; }
  .uproger-home .uh-card-reading .uh-reading-suffix { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
}


/* Search uses the native query with the shared feed presentation. */
.uproger-search-results .uh-feed-head h1,
.uproger-search-results .uh-feed-head p { overflow-wrap:anywhere; }
.uproger-search-results .uh-empty { border:1px solid var(--uh-line); box-shadow:var(--uh-shadow); }
.uproger-search-results .uh-empty h2 { margin:0 0 8px; font-size:20px; color:var(--uh-text); }
.uproger-search-results .uh-empty p { margin:0 0 18px; font-size:14px; color:var(--uh-muted); }
.uproger-search-results .uh-empty-search { display:flex; align-items:center; gap:8px; max-width:520px; margin:0; }
.uproger-search-results .uh-empty-search input { flex:1; min-width:0; width:100%; height:44px; padding:0 12px; border:1px solid var(--uh-line) !important; border-radius:10px; background:var(--uh-control) !important; color:var(--uh-text) !important; font:inherit; }
.uproger-search-results .uh-empty-search button { flex:none; min-height:44px; padding:0 14px; border:0 !important; border-radius:10px; background:var(--uh-text) !important; color:var(--uh-surface) !important; font:inherit; }
@media (max-width:700px) {
  .uproger-search-results .uh-empty { padding:18px; border-radius:17px; }
}

/* Keep legacy long titles from stretching search cards. */
.uproger-search-results .uh-card h2 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; }


/* Additional sidebar links use a separate native WordPress menu. */
.uproger-home .uh-nav-services { display:flex; flex-direction:column; gap:3px; margin:14px 10px 0; padding-top:14px; border-top:1px solid var(--uh-line); }
.uproger-home .uh-nav-services .uh-nav-link { margin-inline:-10px; }
.uproger-home .uh-nav-services .uh-nav-link > span:last-child { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.35; }
.uproger-home .uh-nav-icon.uh-nav-image { padding:0; overflow:hidden; background:transparent; }
.uproger-home .uh-nav-image img { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }

/* Mobile navigation: shared menu typography and clearer theme colors. */
@media (max-width:700px) {
  .uproger-home .uh-nav { --uh-nav-text:#495361; }
  html[data-u-theme="dark"] .uproger-home .uh-nav { --uh-nav-text:#b1b7c3; }
  .uproger-home .uh-nav .uh-nav-link { min-height:48px; font-size:14px; line-height:1.35; color:var(--uh-nav-text); }
  .uproger-home .uh-nav .uh-nav-link:hover,
  .uproger-home .uh-nav .uh-nav-link.is-current { color:var(--uh-text); }
  .uproger-home .uh-nav .uh-subnav a { font-size:14px; color:var(--uh-nav-text); }
}
@media (max-width:700px) and (prefers-color-scheme:dark) {
  html:not([data-u-theme="light"]) .uproger-home .uh-nav { --uh-nav-text:#b1b7c3; }
}

/* Keep native directory content inside the same shell as the homepage. */
.uproger-resource-directory .uh-page-head { align-items:flex-start; }
.uproger-resource-directory .uh-page-head h1 { max-width:none; }
.uproger-resource-directory .uh-page-content { min-width:0; }
.uproger-home.uproger-resource-directory .resource-directory {
  --rd-surface:var(--uh-surface); --rd-border:var(--uh-line);
  --rd-text:var(--uh-text); --rd-muted:var(--uh-muted);
  --rd-control:var(--uh-control); --rd-accent:var(--uh-accent);
  margin:0 0 24px;
}
.uproger-resource-directory .rd-intro { margin-bottom:20px; font-size:14px; }
.uproger-resource-directory .rd-list { width:100%; }
@media (max-width:700px) {
  .uproger-resource-directory .uh-page-head { padding-bottom:14px; }
  .uproger-resource-directory .rd-intro { font-size:13px; }
}

/* Directory filters inside a theme-matched card. */
.uproger-resource-directory .resource-directory .rd-controls {
  --rd-control:var(--uh-control);
  width:100%;
  margin:0 0 18px;
  padding:20px;
  border:1px solid var(--uh-line);
  border-radius:20px;
  background:var(--uh-surface);
  box-shadow:var(--uh-shadow);
}
.uproger-resource-directory .resource-directory .rd-filter-group:last-child { margin-bottom:0; }
@media (max-width:700px) {
  .uproger-resource-directory .resource-directory .rd-controls { padding:16px; border-radius:17px; }
}

/* Owner-supplied Telegram mark, slightly smaller than the VK icon. */
.uproger-home .uh-nav-footer .uh-socials svg.uh-telegram-logo { width:18px; height:18px; }

/* Native post content in the shared homepage shell. */
body.uproger-home.uproger-post-layout {
  --u-bg:var(--uh-bg); --u-surface:var(--uh-surface); --u-surface-2:var(--uh-control);
  --u-surface-3:var(--uh-control); --u-text:var(--uh-text); --u-text-2:var(--uh-text);
  --u-muted:var(--uh-muted); --u-hairline:var(--uh-line); --u-hairline-2:var(--uh-line);
  --u-accent:var(--uh-accent); --u-accent-ink:var(--uh-accent);
  --theme-text-color:var(--uh-text); --theme-heading-color:var(--uh-text);
  --theme-link-initial-color:var(--uh-accent); --theme-link-hover-color:var(--uh-text);
  --theme-border-color:var(--uh-line); --theme-form-text-initial-color:var(--uh-text);
  --theme-form-text-focus-color:var(--uh-text); --theme-form-field-background-initial-color:var(--uh-control);
  --theme-form-field-background-focus-color:var(--uh-control); --theme-form-field-border-initial-color:var(--uh-line);
}
body.uproger-home.uproger-post-layout #main.uh-main { min-width:0; margin:0; padding:0; background:transparent!important; }
body.uproger-home.uproger-post-layout .uh-post-content > article[id^="post-"],
body.uproger-home.uproger-post-layout .uh-post-content > .hero-section {
  width:100%; max-width:none; margin:0; padding:28px!important;
  border:1px solid var(--uh-line); border-radius:20px;
  background:var(--uh-surface); box-shadow:var(--uh-shadow);
}
body.uproger-home.uproger-post-layout .uh-post-content > .hero-section { margin-bottom:18px; }
body.uproger-home.uproger-post-layout .uh-post-content .hero-section,
body.uproger-home.uproger-post-layout .uh-post-content .entry-header { min-height:0; width:100%; max-width:none; text-align:left; }
body.uproger-home.uproger-post-layout .uh-post-content article > .hero-section { margin:0 0 24px; padding:0!important; background:transparent; }
body.uproger-home.uproger-post-layout .uh-post-content .page-title {
  max-width:none; margin:12px 0 16px; font-family:inherit;
  font-size:32px!important; line-height:1.16!important; font-weight:750!important; letter-spacing:-.035em;
  color:var(--uh-text)!important; overflow-wrap:anywhere;
}
body.uproger-home.uproger-post-layout .ct-breadcrumbs { font-size:12px; line-height:1.5; color:var(--uh-muted); }
body.uproger-home.uproger-post-layout .ct-breadcrumbs a { color:var(--uh-muted); border:0!important; }
body.uproger-home.uproger-post-layout .ct-breadcrumbs a:hover { color:var(--uh-accent); }
body.uproger-home.uproger-post-layout .ct-breadcrumbs svg { display:inline-block; width:8px; height:8px; }
body.uproger-home.uproger-post-layout .entry-header > .entry-meta { display:flex; flex-wrap:wrap; gap:8px 14px; margin:0; color:var(--uh-muted); font-size:12px; line-height:1.5; }
body.uproger-home.uproger-post-layout .entry-header .entry-meta svg { display:inline-block; width:13px; height:13px; }
body.uproger-home.uproger-post-layout .entry-header .entry-meta a { color:var(--uh-muted); border:0!important; }
body.uproger-home.uproger-post-layout .uh-post-content .ct-featured-image { display:block!important; margin:0 0 24px; border-radius:13px; overflow:hidden; }
body.uproger-home.uproger-post-layout .ct-featured-image img { width:100%; height:auto; }
body.uproger-home.uproger-post-layout .uh-post-content .entry-content {
  width:100%; max-width:none; min-width:0; margin:0; color:var(--uh-text);
  font-family:inherit; font-size:16px!important; line-height:1.75!important; overflow-wrap:anywhere;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-content > * { max-width:100%; }
body.uproger-home.uproger-post-layout .entry-content :is(h2,h3,h4,h5,h6) { color:var(--uh-text); font-family:inherit; line-height:1.3; letter-spacing:-.02em; scroll-margin-top:92px; }
body.uproger-home.uproger-post-layout .entry-content h2 { margin:32px 0 14px; font-size:25px; }
body.uproger-home.uproger-post-layout .entry-content h3 { margin:26px 0 12px; font-size:21px; }
body.uproger-home.uproger-post-layout .entry-content p { margin-bottom:18px; }
body.uproger-home.uproger-post-layout .entry-content a { color:var(--uh-accent); }
body.uproger-home.uproger-post-layout .entry-content a:hover { color:var(--uh-text); }
body.uproger-home.uproger-post-layout .entry-content :is(img,video,iframe) { max-width:100%; }
body.uproger-home.uproger-post-layout .entry-content :is(pre,.wp-block-table) { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
body.uproger-home.uproger-post-layout .entry-content pre { padding:18px; border:1px solid var(--uh-line); border-radius:12px; background:var(--uh-control); color:var(--uh-text); font-size:13px; line-height:1.65; white-space:pre; overflow-wrap:normal; }
body.uproger-home.uproger-post-layout .entry-content pre code { background:transparent; color:inherit; white-space:inherit; }
body.uproger-home.uproger-post-layout .entry-content :not(pre) > code { background:var(--uh-control); color:var(--uh-text); border-color:var(--uh-line); }
body.uproger-home.uproger-post-layout .entry-content .alignwide,
body.uproger-home.uproger-post-layout .entry-content .alignfull { width:100%; max-width:100%; margin-inline:0!important; }
body.uproger-home.uproger-post-layout .entry-content blockquote { margin-inline:0; padding:18px 20px; border-left:3px solid var(--uh-accent); background:var(--uh-control); color:var(--uh-text); }
body.uproger-home.uproger-post-layout .entry-content .u-toc { margin:0 0 24px; padding:18px; border:1px solid var(--uh-line); border-radius:13px; background:var(--uh-control); }
body.uproger-home.uproger-post-layout .u-toc .u-toc-title { margin-bottom:10px; color:var(--uh-text); font-size:15px; font-weight:650; }
body.uproger-home.uproger-post-layout .u-toc ul { margin:0; padding:0; list-style:none; }
body.uproger-home.uproger-post-layout .u-toc li { margin:0; padding:0; border:0; }
body.uproger-home.uproger-post-layout .u-toc li + li { margin-top:6px; }
body.uproger-home.uproger-post-layout .u-toc li a { display:block; padding:2px 0; border:0!important; text-decoration:none!important; font-size:14px; line-height:1.5; }
body.uproger-home.uproger-post-layout .u-toc .u-toc-sub { padding-left:14px; }
body.uproger-home.uproger-post-layout .entry-content .addtoany_share_save_container { margin:18px 0 0!important; padding:18px 0 0!important; border-color:var(--uh-line)!important; }
body.uproger-home.uproger-post-layout .entry-content .addtoany_share_save_container a { border:0!important; text-decoration:none!important; }
body.uproger-home.uproger-post-layout .post-navigation { width:100%!important; max-width:none!important; margin:24px 0 0!important; padding:0!important; gap:12px; }
body.uproger-home.uproger-post-layout .post-navigation::after { display:none!important; }
body.uproger-home.uproger-post-layout .post-navigation > a { min-width:0; padding:16px!important; background:var(--uh-control)!important; border:1px solid var(--uh-line)!important; border-radius:14px!important; }
body.uproger-home.uproger-post-layout .post-navigation > a:hover { background:var(--uh-bg)!important; }
body.uproger-home.uproger-post-layout .post-navigation .item-content { min-width:0; }
body.uproger-home.uproger-post-layout .post-navigation .item-title { color:var(--uh-text); font-size:14px; line-height:1.4; }
body.uproger-home.uproger-post-layout .post-navigation .item-label { color:var(--uh-muted); font-size:12px; line-height:1.4; text-transform:none; letter-spacing:0; }
body.uproger-home.uproger-post-layout .ct-related-posts-container,
body.uproger-home.uproger-post-layout .ct-comments-container { margin:24px 0 0!important; padding:0!important; border:0!important; background:transparent!important; }
html body.uproger-home.uproger-post-layout #main .ct-related-posts-container > .ct-container,
html body.uproger-home.uproger-post-layout #main .ct-comments-container > :is(.ct-container,.ct-container-narrow) {
  width:100%!important; max-width:none!important; margin:0!important; padding:0!important;
}
body.uproger-home.uproger-post-layout .ct-related-posts { margin:0!important; padding:0!important; border:0!important; }
body.uproger-home.uproger-post-layout .ct-block-title,
body.uproger-home.uproger-post-layout .ct-comments-title { margin:0 0 16px!important; padding:0!important; border:0!important; color:var(--uh-text); font-size:20px!important; line-height:1.3; font-weight:650; text-transform:none; letter-spacing:-.02em; }
body.uproger-home.uproger-post-layout .ct-related-posts-items { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:16px!important; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article {
  display:flex!important; flex-direction:column; min-width:0; margin:0!important; padding:14px!important;
  border:1px solid var(--uh-line)!important; border-radius:20px!important; background:var(--uh-surface)!important; box-shadow:var(--uh-shadow);
}
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > :is(a.ct-image-container,a.urp-cover) { order:0; width:100%; aspect-ratio:1.8!important; margin:0!important; border:0!important; border-radius:13px; overflow:hidden; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > .urc-meta { order:1; display:flex; align-items:center; gap:7px; margin:15px 3px 0; min-width:0; overflow:hidden; white-space:nowrap; color:var(--uh-muted); font-size:12px; }
body.uproger-home.uproger-post-layout .ct-related-posts-items .urc-avatar { display:grid; place-items:center; flex:0 0 29px; width:29px; height:29px; padding-bottom:3px; border-radius:9px; background:#eeeafb; color:#6d52de; font-size:20px; line-height:1; font-weight:850; }
body.uproger-home.uproger-post-layout .ct-related-posts-items .urc-category { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--uh-text); font-weight:650; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > .related-entry-title { order:2; margin:15px 3px 8px!important; padding:0!important; border:0!important; font-size:18px!important; line-height:1.25!important; font-weight:720!important; letter-spacing:-.025em; }
body.uproger-home.uproger-post-layout .ct-related-posts-items .related-entry-title a { color:var(--uh-text)!important; border:0!important; text-decoration:none; }
body.uproger-home.uproger-post-layout .ct-related-posts-items .related-entry-title a:hover { color:var(--uh-accent)!important; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > ul.entry-meta { display:none!important; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > .urc-excerpt { order:3; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:0 3px 20px; color:var(--uh-muted); font-size:14px; line-height:1.5; }
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > .urc-bottom { order:4; display:flex; align-items:center; justify-content:space-between; gap:8px; margin:auto 3px 1px; padding-top:13px; border-top:1px solid var(--uh-line); color:var(--uh-muted); font-size:12px; }
body.uproger-home.uproger-post-layout .urc-bottom :is(a,span.urc-views) { display:inline-flex; align-items:center; gap:5px; }
body.uproger-home.uproger-post-layout .urc-bottom a { color:inherit; border:0!important; }
body.uproger-home.uproger-post-layout .urc-bottom svg { width:16px; height:16px; }
body.uproger-home.uproger-post-layout #comments.ct-comments { margin:0!important; padding:24px!important; border:1px solid var(--uh-line)!important; border-radius:20px; background:var(--uh-surface); }
body.uproger-home.uproger-post-layout .comment-respond { margin:0!important; padding:0!important; border:0!important; }
body.uproger-home.uproger-post-layout .comment-reply-title { margin:0 0 12px; color:var(--uh-text); font-size:22px; line-height:1.3; }
body.uproger-home.uproger-post-layout .comment-form { --theme-form-field-height:44px; color:var(--uh-muted); font-family:inherit; font-size:14px; }
body.uproger-home.uproger-post-layout .comment-form :is(input:not([type=checkbox]):not([type=submit]),textarea) { max-width:100%; border:1px solid var(--uh-line); border-radius:12px; background:var(--uh-control)!important; color:var(--uh-text)!important; }
body.uproger-home.uproger-post-layout .comment-form textarea { min-height:150px; }
body.uproger-home.uproger-post-layout .comment-form .submit { min-height:42px; padding:10px 18px; border:0; border-radius:10px; background:var(--uh-text)!important; color:var(--uh-surface)!important; font:inherit; }
body.uproger-home.uproger-post-layout .comment-form .submit:hover { opacity:.85; }
body.uproger-home.uproger-post-layout .comment-list { color:var(--uh-text); font-size:14px; }
body.uproger-home.uproger-post-layout .comment-list .ct-comment-meta { color:var(--uh-muted); }
body.uproger-home.uproger-post-layout .comment-list .reply a { color:var(--uh-accent); }
@media (max-width:700px) {
  body.uproger-home.uproger-post-layout .uh-post-content > article[id^="post-"],
  body.uproger-home.uproger-post-layout .uh-post-content > .hero-section { padding:18px!important; border-radius:17px; }
  body.uproger-home.uproger-post-layout .uh-post-content .page-title { font-size:27px!important; }
  body.uproger-home.uproger-post-layout .uh-post-content .entry-content { font-size:16px!important; line-height:1.7!important; }
  body.uproger-home.uproger-post-layout .entry-content h2 { font-size:23px; }
  body.uproger-home.uproger-post-layout .entry-content h3 { font-size:20px; }
  body.uproger-home.uproger-post-layout .entry-content pre { padding:14px; font-size:12px; }
  body.uproger-home.uproger-post-layout .entry-content .u-toc { padding:14px; }
  body.uproger-home.uproger-post-layout .ct-related-posts-items { grid-template-columns:minmax(0,1fr)!important; gap:14px!important; }
  body.uproger-home.uproger-post-layout .ct-related-posts-items > article { padding:12px!important; border-radius:17px!important; }
  body.uproger-home.uproger-post-layout #comments.ct-comments { padding:18px!important; border-radius:17px; }
  body.uproger-home.uproger-post-layout .post-navigation > a { padding:12px!important; }
}

/* Match saved post-tool controls to the current palette. */
body.uproger-home.uproger-post-layout .entry-header .entry-meta { font-weight:400; text-transform:none; letter-spacing:0; }
body.uproger-home.uproger-post-layout .entry-header .entry-meta li { text-transform:none; }
body.uproger-home.uproger-post-layout .entry-content :is(.u-copy-btn,.u-copy-btn-quote) { color:var(--uh-text); background:var(--uh-surface); border:1px solid var(--uh-line); }
body.uproger-home.uproger-post-layout .entry-content :is(.u-copy-btn,.u-copy-btn-quote):hover { background:var(--uh-bg); }

/* Override the old theme's late typography and featured-image spacing rules. */
body.uproger-home.uproger-post-layout .uh-post-content .ct-featured-image {
  padding:0!important; margin:0 0 24px!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header > ul.entry-meta {
  flex-direction:row!important; align-items:center; gap:8px 14px!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta :is(li,a) {
  width:auto!important; flex:0 1 auto; font-size:12px!important; font-weight:400!important; line-height:1.5!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li { display:inline-flex; align-items:center; }
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta .u-reading-time { margin:0; }
body.uproger-home.uproger-post-layout .entry-content .u-toc { font-size:14px!important; line-height:1.5!important; }

/* Keep the existing five-item mobile related selection after the shared card styles. */
@media (max-width:700px) {
  body.uproger-home.uproger-post-layout .ct-related-posts-items > article:nth-of-type(n + 6) { display:none!important; }
}


/* Equal-height feed and related cards; spare space stays below the description. */
.uproger-home .uh-cards,
body.uproger-home.uproger-post-layout .ct-related-posts-items {
  grid-auto-rows:1fr;
  align-items:stretch!important;
}
.uproger-home .uh-cards > .uh-card,
body.uproger-home.uproger-post-layout .ct-related-posts-items > article {
  align-self:stretch!important;
}
.uproger-home .uh-card-bottom,
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > .urc-bottom {
  margin-top:auto!important;
}

/* List cards have two columns and one row, without the theme's spare row. */
@media (min-width:701px) {
  html[data-u-feed-view="list"] .uproger-home .uh-card { grid-template-rows:minmax(0,1fr)!important; }
}

/* Keep the post heading, description and metadata visually separate. */
body.uproger-home.uproger-post-layout .uh-post-content .entry-header h1.page-title {
  margin:12px 0!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header > .page-description {
  margin:0 0 16px!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header > ul.entry-meta {
  margin:0!important;
}
/* Native inline text preserves the space after commas between category links. */
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li.meta-categories {
  display:block;
}

/* The clock denotes reading duration, matching the feed cards. */
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta .meta-date > svg {
  display:none!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li.u-reading-time,
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li.u-reading-time > span {
  color:var(--uh-muted)!important;
}
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li.u-reading-time { gap:5px; }
body.uproger-home.uproger-post-layout .uh-post-content .entry-header ul.entry-meta li.u-reading-time::before {
  --uh-reading-clock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  content:"";
  display:block;
  flex:0 0 13px;
  width:13px;
  height:13px;
  background-color:currentColor;
  -webkit-mask:var(--uh-reading-clock) center/contain no-repeat;
  mask:var(--uh-reading-clock) center/contain no-repeat;
}

/* Match the homepage card interactions without changing card geometry. */
body.uproger-home.uproger-post-layout .ct-related-posts-items > article > a.ct-image-container img {
  transition:transform .25s ease;
}
body.uproger-home.uproger-post-layout .ct-related-posts-items > article:hover > a.ct-image-container img {
  transform:scale(1.025);
}
body.uproger-home.uproger-post-layout .ct-related-posts-items .related-entry-title a,
body.uproger-home.uproger-post-layout .ct-related-posts-items .urc-read {
  transition:all .12s cubic-bezier(.455,.03,.515,.955);
}
body.uproger-home.uproger-post-layout .ct-related-posts-items .urc-read:hover {
  color:var(--uh-accent)!important;
}
@media (prefers-reduced-motion:reduce) {
  body.uproger-home.uproger-post-layout .ct-related-posts-items > article > a.ct-image-container img { transition:none; }
}

/* The native WordPress privacy page uses the shared site shell. */
.uproger-policy-page .uh-policy-document {
  min-width:0; padding:28px; border:1px solid var(--uh-line); border-radius:20px;
  background:var(--uh-surface); box-shadow:var(--uh-shadow);
}
.uproger-policy-page .uh-policy-document .uh-page-head { padding:0 0 14px; }
.uproger-policy-page .uh-policy-document .uh-page-head h1 { max-width:none; margin:0; font-size:28px; line-height:1.2; }
.uproger-policy-page .uh-page-content { min-width:0; color:var(--uh-text); font-size:15px; line-height:1.75; overflow-wrap:anywhere; }
.uproger-policy-page .uh-page-content p { margin:0 0 16px; }
.uproger-policy-page .uh-page-content h2 { margin:30px 0 12px; color:var(--uh-text); font-size:22px; line-height:1.3; letter-spacing:-.02em; scroll-margin-top:94px; }
.uproger-policy-page .uh-page-content ul { margin:0 0 18px; padding-left:21px; }
.uproger-policy-page .uh-page-content li { margin:0 0 8px; }
.uproger-policy-page .uh-page-content a { color:var(--uh-accent); text-decoration:underline; text-underline-offset:3px; }
.uproger-policy-page .uh-page-content a:hover { color:var(--uh-text); }
.uproger-policy-page .uh-page-content code { padding:2px 5px; border-radius:4px; background:var(--uh-control); color:var(--uh-text); white-space:normal; font-size:.9em; overflow-wrap:anywhere; }
.uproger-policy-page .uh-page-content .up-policy-date { color:var(--uh-muted); font-size:12px; }
.uproger-policy-page .up-policy-note { margin:0 0 20px; padding:14px 16px; border:1px solid var(--uh-line); border-left:3px solid var(--uh-accent); border-radius:10px; background:var(--uh-control); font-size:13px; line-height:1.6; }
.uproger-policy-page .up-policy-toc { display:flex; flex-wrap:wrap; gap:7px 14px; padding:16px; margin:0 0 24px; border:1px solid var(--uh-line); border-radius:12px; background:var(--uh-control); font-size:13px; line-height:1.5; }
.uproger-policy-page .uh-page-content > :last-child { margin-bottom:0; }
@media(max-width:700px) {
  .uproger-policy-page .uh-policy-document { padding:18px; border-radius:17px; }
  .uproger-policy-page .uh-policy-document .uh-page-head h1 { font-size:25px; }
  .uproger-policy-page .uh-page-content h2 { font-size:20px; }
}

/* Keep the legal document free of article interaction widgets. */
.uproger-policy-page .uh-page-content > :is(.post-views,.wpulike,.addtoany_share_save_container) { display:none!important; }
@media(max-width:700px) {
  .uproger-home.uproger-policy-page .uh-sidebar { display:none!important; }
}

/* Games directory: shared Home shell, with game internals sized by the actual column. */
body.uproger-home.uproger-games-layout .ug-shell{width:100%;max-width:none;margin:0;padding:0;container:uproger-game-shell / inline-size}
body.uproger-home.uproger-games-layout .ug{--ug-bg:var(--uh-bg);--ug-surface:var(--uh-surface);--ug-soft:var(--uh-control);--ug-text:var(--uh-text);--ug-muted:var(--uh-muted);--ug-line:var(--uh-line);--ug-accent:var(--uh-accent);--ug-shadow:var(--uh-shadow)}
.uproger-home.uproger-games-layout .ug-hero{padding:8px 2px 22px}
.uproger-home.uproger-games-layout .ug-back,.uproger-home.uproger-games-layout .ug-eyebrow{display:none}
.uproger-home.uproger-games-layout .ug-hero h1{margin:10px 0 6px;font-size:25px;line-height:1.1;letter-spacing:-.04em;font-weight:750}
.uproger-home.uproger-games-layout .ug-hero>p{font-size:14px;line-height:1.5;max-width:none}
.uproger-home.uproger-games-layout .ug-desktop-break{display:none}
.uproger-home.uproger-games-layout .ug-game{border-radius:20px}
.uproger-home.uproger-games-layout .ug-picker{margin-bottom:18px}
@container uproger-game-shell (max-width:649px){
  .uproger-games-layout .ug-picker{gap:8px}
  .uproger-games-layout .ug .ug-pick{flex-direction:column;justify-content:center;gap:8px;padding:14px 5px 12px;min-height:100px;text-align:center}
  .uproger-games-layout .ug-pick-icon{width:auto;height:auto;background:transparent}
  .uproger-games-layout .ug-pick[aria-selected="true"] .ug-pick-icon{background:transparent}
  .uproger-games-layout .ug-pick-copy strong{font-size:13px}
  .uproger-games-layout .ug-pick-copy small{font-size:10px;margin:0}
  .uproger-games-layout .ug-pick-arrow{display:none}
  .uproger-games-layout .ug-stage{padding:24px 18px}
  .uproger-games-layout .ug-start-grid,.uproger-games-layout .ug-question-grid{display:block;min-height:0}
  .uproger-games-layout .ug-start-copy h2{font-size:29px}
  .uproger-games-layout .ug-start-copy>.ug-button{width:100%}
  .uproger-games-layout .ug-start-art{margin-top:26px}
  .uproger-games-layout .ug-question-title h2{font-size:26px}
  .uproger-games-layout .ug-answers{margin-top:16px}
  .uproger-games-layout .ug .ug-code{font-size:12px;min-height:130px;padding:16px 12px}
  .uproger-games-layout .ug-next-row>.ug-button{width:100%}
  .uproger-games-layout .ug .ug-code-line{font-size:12px;gap:11px;padding:10px 7px}
  .uproger-games-layout .ug-fixes{display:flex;flex-direction:column;gap:8px}
  .uproger-games-layout .ug .ug-fix{min-height:49px;align-items:center;gap:9px}
  .uproger-games-layout .ug-mission{grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:start}
  .uproger-games-layout .ug .ug-hint{grid-column:2}
  .uproger-games-layout .ug-log{height:230px;font-size:11px;padding:13px 12px}
}
@media(max-width:700px){
  .uproger-home.uproger-games-layout .ug-hero{padding-top:4px;padding-bottom:18px}
  .uproger-home.uproger-games-layout .ug-hero h1{font-size:24px}
  .uproger-home.uproger-games-layout .ug-hero>p{font-size:13px}
  .uproger-home.uproger-games-layout .ug-game{border-radius:17px}
}
@container uproger-game-shell (max-width:319px){
  .uproger-games-layout .ug-stage{padding:20px 14px}
  .uproger-games-layout .ug-picker{gap:6px}
  .uproger-games-layout .ug-pick-copy strong{font-size:12px}
  .uproger-games-layout .ug-pick-copy small{font-size:9px}
  .uproger-games-layout .ug-start-copy h2{font-size:26px}
  .uproger-games-layout .ug .ug-code,.uproger-games-layout .ug .ug-code-line{font-size:11px}
}

/* Keep words intact once responsive cover-label fitting starts. */
.uproger-home .uh-card-media.is-placeholder .uh-placeholder-topic.u-cover-topic-fit,
.uproger-home .ct-related-posts-items .urp-cover-topic.u-cover-topic-fit {
  white-space:normal;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}

/* Compact list rows: deferred grid estimates must not set list-card height. */
@media (min-width:701px) {
  html[data-u-feed-view="list"] body.uproger-home .uh-cards > .uh-card {
    content-visibility:visible;
    contain-intrinsic-size:none;
  }
}

/* The course entry is independent of the articles' saved cards/list preference. */
.uproger-home .uh-course-catalog{margin:0 0 28px;min-width:0}
.uproger-home .uh-course-card{display:grid;grid-template-columns:minmax(160px,35%) minmax(0,1fr);gap:22px;padding:16px;background:var(--uh-surface);border:1px solid var(--uh-line)!important;border-radius:22px;color:var(--uh-text);text-decoration:none!important;box-shadow:0 1px 3px rgba(0,0,0,.04);min-width:0;transition:border-color .12s cubic-bezier(.455,.03,.515,.955),box-shadow .12s cubic-bezier(.455,.03,.515,.955)}
.uproger-home .uh-course-card:hover{border-color:var(--uh-accent)!important;box-shadow:0 5px 18px rgba(0,0,0,.08)}
.uproger-home .uh-course-card:focus-visible{outline:2px solid var(--uh-accent);outline-offset:4px}
.uproger-home .uh-course-cover{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-width:0;min-height:180px;overflow:hidden;border-radius:15px;padding:20px;background:radial-gradient(ellipse at 100% 0%,rgba(215,133,72,.35),transparent 70%),linear-gradient(125deg,#1e2030,#803e23);color:#fff6eb}
.uproger-home .uh-course-brand{position:relative;z-index:1;font-size:10px;font-weight:750;letter-spacing:.16em;line-height:1.4}
.uproger-home .uh-course-brand>span{color:#b3a1d9}
.uproger-home .uh-course-symbol{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:76px;font-weight:750;line-height:1;color:#e2a363;opacity:.55;letter-spacing:-.08em}
.uproger-home .uh-course-language{position:relative;z-index:1;font-size:34px;line-height:1.1;font-weight:750;letter-spacing:-.04em}
.uproger-home .uh-course-body{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:4px 0}
.uproger-home .uh-course-body .uh-course-meta{margin:0 0 10px;color:var(--uh-muted);font-size:13px;line-height:1.4}
.uproger-home .uh-course-body h2{margin:0 0 12px;color:var(--uh-text);font-size:24px;line-height:1.2;font-weight:700;letter-spacing:-.025em}
.uproger-home .uh-course-description{margin:0 0 18px;color:var(--uh-muted);font-size:15px;line-height:1.55;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.uproger-home .uh-course-open{display:inline-flex;align-items:center;gap:8px;margin-top:auto;color:var(--uh-accent);font-size:14px;line-height:1.4;font-weight:500}
.uproger-home .uh-course-open svg{width:18px;height:18px;flex:none}
.uproger-home .uh-course-materials-title{margin:0 0 16px;font-size:21px;line-height:1.3;font-weight:650;color:var(--uh-text)}
@media(max-width:700px){.uproger-home .uh-course-card{grid-template-columns:minmax(0,1fr);gap:18px;padding:14px;border-radius:20px}.uproger-home .uh-course-cover{aspect-ratio:16/9;min-height:0;padding:20px}.uproger-home .uh-course-body{padding:0 3px 3px}.uproger-home .uh-course-body h2{font-size:23px}.uproger-home .uh-course-description{-webkit-line-clamp:3}.uproger-home .uh-course-catalog{margin-bottom:24px}}

/* Size each desktop card row from its own content, not deferred rows below it. */
@media (min-width:701px) {
  html:not([data-u-feed-view="list"]) body.uproger-home .uh-cards {
    grid-auto-rows:auto;
  }
}

/* A single-column phone feed needs no shared height across different stories. */
@media (max-width:700px) {
  body.uproger-home .uh-cards { grid-auto-rows:auto; }
}
