/* Topic detail: shared reading layout for desktop and mobile browsers. */
.page-topic .topic-page{padding:28px 0 40px}
.page-topic .topic-page .main-layout{grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}
.topic-page .main-content{min-width:0}
.topic-page .topic-story{border:1px solid var(--border-light,#e1e7eb);border-radius:18px;overflow:visible;background:var(--bg-secondary,#fff);box-shadow:0 4px 18px #102b3d05;margin:0 0 20px}
.topic-page .topic-story:hover{box-shadow:0 4px 18px #102b3d05}
.topic-heading{padding:28px 30px 22px}
.topic-labels{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:13px}
.topic-category{display:inline-flex;padding:5px 10px;border-radius:7px;background:#edf3f7;color:#1b4965;font-size:12px;font-weight:650;line-height:1.4;text-decoration:none}
.topic-subcategory{font-size:12px;color:var(--text-secondary,#65727d)}
.topic-labels .badge{font-size:11px;text-transform:none;letter-spacing:0}
.topic-heading h1{margin:0 0 17px;color:var(--text-primary,#132f40);font-size:clamp(24px,2.5vw,32px);font-weight:750;line-height:1.32;letter-spacing:-.035em;overflow-wrap:anywhere;text-wrap:pretty}
.topic-byline{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;font-size:12px;color:var(--text-secondary,#687783);line-height:1.5}
.topic-author{display:inline-flex;align-items:center;gap:9px;min-width:0;color:#1b4965;text-decoration:none;font-size:13px}
.topic-author strong{font-weight:750}
.topic-author-avatar{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:#e8f0f4;color:#1b4965;font-size:12px;overflow:hidden}
.topic-author-avatar img{width:100%;height:100%;object-fit:cover}
.topic-byline time{border-left:1px solid var(--border-light,#e1e7eb);padding-left:14px}
.page-announcements .topic-byline>time:first-child{border-left:0;padding-left:0}
.topic-views{display:inline-flex;align-items:center;gap:5px;margin-left:auto}
.topic-gallery{margin:0 30px 2px;min-width:0}
.topic-gallery-stage{position:relative;display:grid;place-items:center;height:clamp(180px,58vw,360px);border:1px solid var(--border-light,#e1e7eb);border-radius:12px;overflow:hidden;background:#f5f7f9;isolation:isolate;touch-action:pan-y}
.topic-gallery-zoom{display:block;width:100%;height:100%;min-height:0;border:0;padding:12px;background:transparent;cursor:zoom-in;line-height:0}
.topic-gallery-image{display:block;width:100%;max-width:100%;height:100%;max-height:100%;margin:0 auto;object-fit:contain}
.topic-gallery-image[hidden],.topic-gallery-unavailable[hidden]{display:none}
.topic-gallery-unavailable{padding:56px 45px;color:var(--text-secondary,#687783);font-size:13px;text-align:center}
.topic-gallery-stage.image-unavailable .topic-gallery-zoom,.topic-gallery-stage.image-unavailable .topic-gallery-expand{display:none}
.topic-gallery-prev,.topic-gallery-next{position:absolute;top:50%;display:grid;place-items:center;width:36px;height:36px;border:1px solid #dbe3e9;border-radius:50%;background:#ffffffed;color:#234b64;transform:translateY(-50%);box-shadow:0 2px 10px #102b3d12;cursor:pointer;font-size:12px}
.topic-gallery-prev{left:10px}.topic-gallery-next{right:10px}
.topic-gallery-count,.topic-gallery-expand{position:absolute;bottom:10px;padding:5px 8px;border-radius:6px;background:#ffffffeb;color:#365469;font-size:11px;font-weight:600;pointer-events:none}
.topic-gallery-count{left:10px}.topic-gallery-expand{right:10px}
.topic-gallery-thumbs{display:flex;gap:8px;padding:10px 1px 0;overflow-x:auto;scrollbar-width:thin}
.topic-gallery-thumbs button{flex:none;width:54px;height:44px;padding:3px;border:2px solid transparent;border-radius:7px;background:#f2f5f7;cursor:pointer;opacity:.65}
.topic-gallery-thumbs button[aria-pressed=true]{border-color:#2c6685;opacity:1}
.topic-gallery-thumbs img{display:block;width:100%;height:100%;object-fit:contain;border-radius:3px}
.topic-page .topic-story>.post-body{padding:22px 30px 26px;min-height:0;color:var(--text-primary,#263743);font-size:16px;line-height:1.85;overflow-wrap:anywhere;text-align:start}
.topic-page .topic-story>.social-embeds{padding:0 30px 24px;grid-template-columns:minmax(0,1fr)}
.topic-page .topic-post-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 30px;padding:16px 0 20px;border-top:1px solid var(--border-light,#e1e7eb);background:none;overflow:visible}
.topic-page .topic-action-bar{display:flex;flex-wrap:nowrap;gap:7px;width:auto;max-width:none;margin:0}
.topic-page .topic-action-bar>form,.topic-page .topic-action-bar>.report-form,.topic-page .topic-action-bar>.topic-icon-action{flex:0 0 auto}
.topic-page .topic-action-bar .topic-icon-action{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:40px;height:38px;min-height:38px;padding:0;border:1px solid var(--border-light,#e1e7eb);border-radius:9px;background:transparent;color:#657783;font-size:15px;box-shadow:none;transform:none;filter:none}
.topic-page .topic-action-bar .action-like,.topic-page .topic-action-bar .action-dislike{width:auto;min-width:58px;padding:0 11px}
.topic-page .topic-action-bar .topic-icon-action span{font-size:12px;font-weight:600}
.topic-page .topic-action-bar .topic-icon-action:hover{background:#f0f5f8;color:#1b4965;border-color:#c6d7e1}
.topic-page .topic-action-bar .action-like.is-active{background:#e5f4eb;border-color:#b4dbc5;color:#18764d}
.topic-page .topic-action-bar .action-dislike.is-active{background:#fff0f0;border-color:#edc6cc;color:#a63848}
.topic-page .topic-action-bar .action-save.is-active{background:#e9f0f7;color:#235777}
.topic-page .topic-action-bar .action-report{background:transparent!important;color:#657783!important;border-color:var(--border-light,#e1e7eb)!important}
.topic-page .topic-action-bar .report-form>summary.topic-icon-action{width:40px;height:38px;min-height:38px;padding:0;border-radius:9px;font-size:15px}
.topic-page .topic-action-bar .report-form.is-compact[open]{flex:0 0 auto}
.topic-page .topic-action-bar .report-form.is-compact>form{top:46px;right:0;text-align:left}
.topic-page .topic-secondary-actions{margin:0}
.topic-page .topic-secondary-actions .btn{padding:7px 10px;font-size:12px;min-height:34px;box-shadow:none}
.topic-page .reaction-status{flex-basis:100%;margin:0;color:#a63848;font-size:12px;line-height:1.6}
.topic-page .reaction-status[hidden]{display:none}
[data-reaction-form] button:disabled{opacity:.55;cursor:wait}
.topic-page .topic-secondary-actions:empty{display:none}
.topic-page .tag-list:empty{display:none}
.topic-page .tag-list{gap:6px;margin:0 0 20px}
.topic-replies-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 14px}
.topic-replies-heading h2.subheading{display:flex;align-items:center;gap:8px;margin:0;font-size:19px;color:var(--text-primary,#183344)}
.topic-replies-heading h2 span{padding:3px 8px;border-radius:20px;background:#e8eff4;font-size:12px;color:#47667b}
.topic-replies-heading>a{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#2c6685}
.topic-page .reply-card{background:var(--bg-secondary,#fff);border:1px solid var(--border-light,#e1e7eb);border-radius:13px;box-shadow:none;overflow:visible;margin-bottom:12px}
.topic-page .reply-card .post-header{padding:16px 18px 0;background:transparent;border:0}
.topic-page .reply-card .post-avatar{width:32px;height:32px;border-radius:50%;box-shadow:none;overflow:hidden}
.topic-page .reply-card .reply-author-line{gap:5px 12px;line-height:1.5}
.topic-page .reply-card .member-link{font-size:13px;font-weight:700;color:#1b4965}
.topic-page .reply-card .post-date{font-size:11px;color:var(--text-secondary,#687783)}
.topic-page .reply-card .post-body{padding:12px 18px 14px;font-size:14px;line-height:1.8;min-height:0;text-align:start}
.topic-page .reply-actions{padding:0 18px 12px;flex-wrap:wrap;gap:5px}
.topic-page .reply-reaction{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:5px 9px;background:transparent;border-color:transparent;color:#667986;font-size:12px}
.topic-page .reply-reaction.is-active{color:#1b6554;background:#e8f5ee;border-color:#c9e7d9}
.topic-page .reply-card>.reaction-status{padding:0 18px 12px}
.topic-page .reply-card.is-nested{width:calc(100% - 24px);margin-left:24px;border-left:3px solid #c1d9cf}
.topic-page .inline-reply summary{padding:8px 4px;font-size:12px;min-height:34px}
.topic-page .inline-reply[open]{flex-basis:100%;margin-left:0}
.topic-page .inline-reply form{min-width:0;width:100%;margin-top:4px}
.topic-page .announcement-inline-reply{margin:0 18px 12px}
.topic-page .inline-reply .btn{justify-self:end}
.topic-page .empty-state{padding:22px 18px;border:1px dashed var(--border-light,#dbe3e8);border-radius:12px;background:transparent}
.topic-page .empty-state i{font-size:24px;margin-bottom:8px;color:#849ba9}
.topic-page .empty-state h3{font-size:14px;font-weight:500;color:var(--text-secondary,#687783)}
.topic-page .reply-form{padding:20px;margin-top:16px;background:var(--bg-secondary,#fff);border:1px solid var(--border-light,#e1e7eb);border-radius:13px;box-shadow:none}
.topic-page .reply-form h3{margin:0 0 12px;font-size:15px}
.topic-page .reply-form .form-group{margin:0 0 10px}
.topic-page .reply-form textarea{min-height:100px;font:inherit;font-size:14px;line-height:1.7;border-radius:9px;background:var(--bg-secondary,#fff)}
.topic-page .reply-form form{display:grid}
.topic-page .reply-form .btn{justify-self:end;padding:9px 17px;min-height:40px;font-size:13px;box-shadow:none;border-radius:9px}
.topic-page .sidebar .widget-header{padding:14px 18px;background:transparent}
.topic-page .sidebar .widget-body{padding:16px 18px}
.topic-page .sidebar .sidebar-widget{border-radius:14px;box-shadow:none;animation:none}
.page-topic .gallery-lightbox{padding:56px 48px 48px}
.page-topic .gallery-lightbox img{max-width:100%;max-height:calc(100dvh - 110px);border-radius:4px}
.topic-icon-action[data-copied=true]{color:#18764d!important;border-color:#9dceb3!important}
@media(min-width:1101px){.topic-page .sidebar{position:sticky;top:108px}}
@media(max-width:1000px){.page-topic .topic-page .main-layout{grid-template-columns:minmax(0,1fr);gap:20px}.topic-page .sidebar{display:none}.topic-heading{padding:24px}.topic-gallery{margin-inline:24px}.topic-page .topic-story>.post-body{padding:20px 24px}.topic-page .topic-post-footer{margin-inline:24px}}
@media(max-width:767px){
 .page-topic .topic-page{padding:16px 0 24px}
 .page-topic .topic-page .container{padding-inline:12px}
 .topic-page .topic-story{border-radius:14px;margin-bottom:16px}
 .topic-heading{padding:19px 18px 16px}
 .topic-labels{gap:6px;margin-bottom:10px}
 .topic-category,.topic-subcategory{font-size:11px}
 .topic-heading h1{font-size:23px;line-height:1.34;letter-spacing:-.025em;margin-bottom:14px}
 .topic-byline{gap:6px 10px;font-size:11px}
 .topic-author{font-size:12px;gap:7px}
 .topic-author-avatar{width:28px;height:28px}
 .topic-byline time{padding-left:10px}
 .topic-views{margin-left:0}
 .topic-gallery{margin:0 12px}
 .topic-gallery-stage{border-radius:9px;height:clamp(180px,65vw,300px)}
 .topic-gallery-zoom{padding:8px}
 .topic-gallery-image{max-height:100%}
 .topic-gallery-prev,.topic-gallery-next{width:32px;height:32px}
 .topic-gallery-thumbs{gap:6px;padding-top:8px}
 .topic-gallery-thumbs button{width:46px;height:38px}
 .topic-page .topic-story>.post-body{padding:18px;font-size:15px;line-height:1.8}
 .topic-page .topic-story>.social-embeds{padding:0 12px 18px}
 .topic-page .topic-post-footer{margin:0 18px;padding:13px 0 16px;gap:10px}
 .topic-page .topic-action-bar{gap:6px;max-width:100%}
 .topic-page .topic-action-bar .topic-icon-action{width:36px;min-height:38px;border-radius:8px}
 .topic-page .topic-action-bar .report-form>summary.topic-icon-action{width:36px;border-radius:8px}
 .topic-page .topic-action-bar .action-like,.topic-page .topic-action-bar .action-dislike{width:auto;min-width:52px;padding:0 8px}
 .topic-page .topic-action-bar .report-form.is-compact>form{position:fixed;inset:auto 12px 86px;width:auto;max-height:60vh;overflow-y:auto}
 .topic-page .topic-secondary-actions{width:100%}
 .topic-replies-heading{margin:22px 4px 12px}
 .topic-replies-heading h2.subheading{font-size:17px}
 .topic-page .reply-card .post-header{padding:14px 14px 0}
 .topic-page .reply-card .post-body{padding:10px 14px 12px}
 .topic-page .reply-actions{padding-inline:10px}
 .topic-page .reply-card.is-nested{width:calc(100% - 16px);margin-left:16px}
 .topic-page .reply-form{padding:16px}
 .page-topic .gallery-lightbox{padding:52px 12px}
 .page-topic .gallery-lightbox img{max-height:calc(100dvh - 120px)}
}
body.theme-dark .topic-page .topic-author,body.theme-dark .topic-page .member-link{color:#97c9e7}
body.theme-dark .topic-gallery-stage{background:#192630}
body.theme-dark .topic-page .topic-action-bar .topic-icon-action{color:#bed0db}
@media(prefers-reduced-motion:reduce){.topic-page *{scroll-behavior:auto!important}}
