/* NightBoard 2.0 Beta 19 — readable public redesign.
   Modernizes the existing public UI without changing forum semantics.
   Typography floor: essential UI >=14px; body >=16px. Compact mode changes spacing, never text size. */
:root{
  --nbv5-bg:#090c15;--nbv5-deep:#0e1322;--nbv5-panel:#151d30;--nbv5-panel2:#1c2740;--nbv5-panel3:#22304c;
  --nbv5-line:rgba(150,165,200,.18);--nbv5-line2:rgba(150,165,200,.32);
  --nbv5-text:#eee8dc;--nbv5-muted:#b7c0d2;--nbv5-dim:#98a4ba;
  --nbv5-teal:#5fd0cf;--nbv5-teal2:#91efed;--nbv5-amber:#e8b45a;--nbv5-amber2:#ffd184;
  --nbv5-violet:#aa9cff;--nbv5-red:#ef7d73;--nbv5-green:#7fd7a4;
  --nbv5-radius:14px;--nbv5-radius-sm:10px;--nbv5-shadow:0 14px 42px rgba(0,0,0,.28);
  --nbv5-serif:Fraunces,Georgia,"Times New Roman",serif;--nbv5-body:Spectral,Georgia,"Times New Roman",serif;
  --nbv5-ui:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --nbv5-space:1;
}
html[data-density="compact"]{--nbv5-space:.82}
html,body{background:var(--nbv5-bg);color:var(--nbv5-text)}
body{font-size:16px;line-height:1.62;background:radial-gradient(1100px 600px at 13% -12%,rgba(95,208,207,.085),transparent 62%),radial-gradient(900px 540px at 94% 0,rgba(170,156,255,.055),transparent 62%),var(--nbv5-bg)}
body,button,input,select,textarea{font-family:var(--nbv5-ui)}
a{transition:color .15s,border-color .15s,background .15s}
.eyebrow,.meta,.field-hint,.thread-status-text,.menu-label,.drawer-label{font-size:12px!important;line-height:1.4!important;letter-spacing:.075em!important}
small,.small,.muted,.nb2-meta{font-size:14px!important;line-height:1.5!important}
.btn,button,input,select,textarea,.nav a,.nav button{font-size:14px;min-height:42px}

/* Header — preserve the current NightBoard shape, make it calmer and more readable. */
.site-head{background:rgba(9,12,21,.91)!important;border-bottom:1px solid var(--nbv5-line)!important;backdrop-filter:blur(16px)}
.site-head .shell.top{min-height:72px;gap:18px}
.brand-name{font-family:var(--nbv5-serif)!important;font-size:25px!important;letter-spacing:.01em}.brand-copy small{font-size:11px!important;letter-spacing:.12em!important}
.nav-v9-primary>a,.nav-v9-primary .menu-trigger{font-size:14px!important;min-height:44px!important;padding:0 13px!important;border-radius:9px!important}
.nav-v9-search input{font-size:15px!important;min-height:44px!important}
.nav-v9-login,.nav-v9-create{min-height:44px!important;font-size:14px!important}
.forum-quickbar{background:rgba(14,19,34,.72)!important;border-color:var(--nbv5-line)!important}
.forum-quickbar-inner a{font-size:14px!important;min-height:44px!important;padding:0 12px!important}

/* Shared page rhythm. */
.shell.page{max-width:1180px!important;padding-top:28px!important;padding-bottom:88px!important}
.panel,.card,.thread-card,.board-context,.profile-card{border-radius:var(--nbv5-radius)!important;border-color:var(--nbv5-line)!important;box-shadow:none!important;background:linear-gradient(180deg,rgba(21,29,48,.88),rgba(14,19,34,.92))!important}
.section-head h1,.page-head h1,.thread-head h1,.editorial-thread-head h1{font-family:var(--nbv5-serif)!important;letter-spacing:-.015em!important}
.section-head h1,.page-head h1{font-size:clamp(32px,4vw,46px)!important;line-height:1.1!important}
.section-head p,.page-head p{font-size:17px!important;line-height:1.6!important;color:var(--nbv5-muted)!important;max-width:72ch}

/* Forum index: keep the familiar forum index, refine the surfaces instead of turning it into a feed. */
.forum-index,.forum-layout{gap:18px!important}
.forum-category,.forum-section,.category-panel{overflow:hidden;border-radius:var(--nbv5-radius)!important}
.forum-category-head,.category-head,.forum-section-head{padding:15px 18px!important;background:linear-gradient(90deg,rgba(95,208,207,.07),rgba(170,156,255,.025) 52%,transparent)!important;border-bottom:1px solid var(--nbv5-line)!important}
.forum-category-head h2,.category-head h2,.forum-section-head h2{font-family:var(--nbv5-serif)!important;font-size:22px!important;color:var(--nbv5-amber2)!important}
.forum-row,.forum-item{padding:17px 18px!important;min-height:88px!important;border-color:var(--nbv5-line)!important}
.forum-row h3,.forum-item h3{font-family:var(--nbv5-serif)!important;font-size:20px!important;line-height:1.25!important}
.forum-row p,.forum-item p{font-size:15px!important;line-height:1.55!important;color:var(--nbv5-muted)!important}
.forum-row:hover,.forum-item:hover{background:linear-gradient(90deg,rgba(95,208,207,.065),rgba(170,156,255,.015))!important;box-shadow:inset 3px 0 var(--nbv5-teal)!important}

/* Board/list view: more like the preferred current design, with strong readable rows. */
.board-page-head,.board-header{border-radius:var(--nbv5-radius)!important;padding:22px 24px!important}
.board-page-head h1,.board-header h1{font-size:clamp(32px,4vw,44px)!important}
.thread-toolbar{padding:11px!important;gap:10px!important;border-radius:var(--nbv5-radius)!important}
.thread-toolbar input,.thread-toolbar select{font-size:15px!important;min-height:44px!important}
.thread-density a{font-size:14px!important;min-height:42px!important;display:inline-flex!important;align-items:center!important}
.thread-card-v4{display:grid!important;grid-template-columns:minmax(0,1fr) 260px!important;align-items:stretch!important;border-radius:0!important;border-left:0!important;border-right:0!important;border-top:1px solid var(--nbv5-line)!important;background:transparent!important}
.thread-card-v4:first-of-type{border-top:0!important}
.thread-card-main{padding:18px 20px!important;gap:14px!important}
.thread-card-copy h2,.thread-card-copy h3,.thread-card-title{font-family:var(--nbv5-serif)!important;font-size:20px!important;line-height:1.3!important}
.thread-card-copy p,.thread-card-excerpt{font-size:15px!important;line-height:1.55!important;color:var(--nbv5-muted)!important}
.thread-byline,.thread-card-activity,.thread-last,.thread-numbers{font-size:14px!important;line-height:1.45!important}
.thread-card-activity{border-left:1px solid var(--nbv5-line)!important;padding:15px 17px!important;background:rgba(9,12,21,.22)!important}
.thread-card-v4:hover{background:linear-gradient(90deg,rgba(95,208,207,.055),transparent)!important}
.board-context h2{font-family:var(--nbv5-serif)!important;font-size:25px!important}.board-context p{font-size:15px!important}
.board-context-stats span,.your-place span,.board-person small{font-size:13px!important}

/* Thread: classic author-left/post-right remains canonical on desktop. */
.thread-nav-strip{border-radius:var(--nbv5-radius)!important;padding:10px 14px!important}
.thread-hero-v8{border-radius:var(--nbv5-radius)!important;overflow:hidden!important;min-height:0!important;padding:24px!important;background:linear-gradient(125deg,rgba(21,29,48,.95),rgba(14,19,34,.96))!important}
.thread-hero-art-v8{opacity:.22!important}
.thread-head h1,.editorial-thread-head h1{font-size:clamp(30px,4vw,43px)!important;line-height:1.13!important}
.thread-title-meta,.thread-context-row{font-size:14px!important;line-height:1.45!important}
.thread-command-bar{border-radius:var(--nbv5-radius)!important}
.post,.post-card,.message-post{grid-template-columns:210px minmax(0,1fr)!important;border-color:var(--nbv5-line)!important}
.userbox,.post-author,.author-column{padding:20px 16px!important;background:linear-gradient(180deg,rgba(34,48,76,.54),rgba(14,19,34,.46))!important;border-right:1px solid var(--nbv5-line)!important}
.userbox .avatar,.post-author .avatar,.author-column .avatar{width:92px!important;height:92px!important;margin-inline:auto!important}
.userbox h3,.post-author h3,.author-column h3{font-family:var(--nbv5-serif)!important;font-size:20px!important;line-height:1.2!important}
.userbox .role,.post-author .role,.author-column .role{font-size:14px!important;line-height:1.4!important}
.postmeta,.post-meta,.post-header{font-size:14px!important;line-height:1.5!important;min-height:48px!important;padding:11px 18px!important}
.prose,.post-content,.post-body{font-family:var(--nbv5-body)!important;font-size:18px!important;line-height:1.72!important;max-width:76ch!important;padding:22px!important}
.prose blockquote,.post-content blockquote,.post-body blockquote{font-family:var(--nbv5-ui)!important;font-size:15px!important;line-height:1.6!important;padding:12px 15px!important;border-left:3px solid var(--nbv5-teal)!important;background:rgba(95,208,207,.065)!important}
.post-actions,.postfoot,.post-footer{min-height:52px!important;padding:10px 18px!important;gap:9px!important}.post-actions button,.postfoot button,.post-footer button,.post-actions a,.postfoot a,.post-footer a{font-size:14px!important;min-height:40px!important;padding:8px 10px!important}

/* Profiles — modern, but recognizably a forum member page. */
.profile-hero,.profilehero{border-radius:var(--nbv5-radius)!important;padding:28px!important;background:radial-gradient(circle at 78% 18%,rgba(95,208,207,.13),transparent 34%),linear-gradient(135deg,rgba(232,180,90,.055),transparent),var(--nbv5-deep)!important}
.profile-hero h1,.profilehero h1{font-size:36px!important;font-family:var(--nbv5-serif)!important}.profile-hero p,.profilehero p{font-size:16px!important}
.profile-tabs a,.profile-tabs button,.profiletabs button{font-size:14px!important;min-height:46px!important}
.member-card h3,.membercard h3{font-size:20px!important}.member-card p,.membercard p{font-size:15px!important}

/* Drawers/popovers: large enough to read and tap. */
.drawer,.menu-panel,.account-menu-panel,.member-popover,.profile-popover{font-size:15px!important}
.drawer a,.drawer button,.menu-panel a,.menu-panel button{min-height:44px!important;font-size:14px!important}
.drawer h2{font-size:27px!important}.drawer label{font-size:14px!important}.drawer input,.drawer select,.drawer textarea{font-size:16px!important;min-height:46px!important}

/* Bottom tabbar — mobile-first navigation, hidden on desktop by existing styles. */
.tabbar a{font-size:12px!important;min-height:58px!important}.tabbar svg{width:23px!important;height:23px!important}

/* V2 read-cutover templates share the same public language. */
.nbv5-v2{font-family:var(--nbv5-ui);font-size:16px;line-height:1.62;background:var(--nbv5-bg);color:var(--nbv5-text);min-height:100vh}
.nbv5-v2 .nb2-brand{position:sticky;top:0;z-index:50;min-height:70px;padding:0 22px!important;background:rgba(9,12,21,.92)!important;backdrop-filter:blur(16px);border-color:var(--nbv5-line)!important}.nbv5-v2 .nb2-brand strong{font-family:var(--nbv5-serif)!important;font-size:26px!important}.nbv5-v2 .nb2-brand a{font-size:15px!important;min-height:44px;display:inline-flex;align-items:center}.nbv5-v2 .nb2-shell{max-width:1180px!important;padding:28px 18px 90px!important}.nbv5-v2 .nb2-row{border-color:var(--nbv5-line)!important;border-radius:var(--nbv5-radius-sm)!important;background:linear-gradient(180deg,rgba(21,29,48,.85),rgba(14,19,34,.9))!important;padding:18px!important}.nbv5-v2 .nb2-row h3{font-family:var(--nbv5-serif)!important;font-size:20px!important;line-height:1.28!important}.nbv5-v2 .nb2-meta{font-size:14px!important;color:var(--nbv5-muted)!important}.nbv5-v2 .nb2-stats{font-size:14px!important}.nbv5-v2 .post{display:grid!important;grid-template-columns:210px minmax(0,1fr)!important}.nbv5-v2 .userbox{padding:20px 16px!important}.nbv5-v2 .prose{font-family:var(--nbv5-body)!important;font-size:18px!important;line-height:1.72!important}

/* Tablet */
@media(max-width:980px){
  .shell.page{padding-inline:14px!important}.nav-v9-primary{gap:2px!important}.nav-v9-primary>a,.nav-v9-primary .menu-trigger{padding-inline:9px!important}
  .thread-card-v4{grid-template-columns:minmax(0,1fr) 210px!important}
  .post,.post-card,.message-post,.nbv5-v2 .post{grid-template-columns:170px minmax(0,1fr)!important}
  .userbox .avatar,.post-author .avatar,.author-column .avatar{width:76px!important;height:76px!important}
}

/* Phone: deliberately redesigned; not a squeezed desktop page. */
@media(max-width:720px){
  body{font-size:16px!important;line-height:1.62!important;padding-bottom:76px!important}
  .site-head .shell.top{min-height:60px!important;padding:8px 12px!important}.brand-name{font-size:22px!important}.brand-copy small{display:none!important}
  .site-head .nav-v9-primary,.site-head .nav-v9-search,.forum-quickbar,.staff-bar{display:none!important}
  .nav-toggle{width:46px!important;height:46px!important;font-size:20px!important}.mobile-account-link,.nav-v9-actions>a,.nav-v9-actions>button{min-width:46px!important;min-height:46px!important}
  .shell.page{padding:18px 10px 96px!important}.section-head,.page-head{display:block!important;margin-bottom:16px!important}.section-head h1,.page-head h1{font-size:32px!important}.section-head p,.page-head p{font-size:16px!important}
  .panel,.card,.board-page-head,.board-header,.thread-hero-v8,.thread-nav-strip{border-radius:12px!important}

  /* Forum index becomes readable full-width rows. */
  .forum-index,.forum-layout,.board-layout,.board-layout-social{display:block!important}
  .forum-index>aside,.board-layout>aside,.board-context{margin-top:14px!important}
  .forum-row,.forum-item{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;gap:12px!important;padding:16px 14px!important;min-height:0!important}
  .forum-row .count,.forum-row .latest,.forum-item .count,.forum-item .latest{grid-column:2!important;text-align:left!important;border:0!important;padding:0!important;margin-top:5px!important;font-size:14px!important}
  .forum-category-head,.category-head,.forum-section-head{padding:14px!important}.forum-category-head h2,.category-head h2,.forum-section-head h2{font-size:20px!important}

  /* Discussion lists stop pretending phone screens have table columns. */
  .thread-toolbar{display:grid!important;grid-template-columns:1fr!important;padding:10px!important}.thread-toolbar form,.thread-toolbar input,.thread-toolbar select{width:100%!important}
  .thread-density{display:flex!important}.thread-density a{flex:1!important;justify-content:center!important}
  .thread-card-v4{display:block!important;padding:0!important}
  .thread-card-main{padding:16px 14px!important;display:block!important}.thread-state{float:left!important;margin:3px 10px 6px 0!important}.thread-card-copy h2,.thread-card-copy h3,.thread-card-title{font-size:19px!important}.thread-card-copy p,.thread-card-excerpt{font-size:15px!important}
  .thread-card-activity{border-left:0!important;border-top:1px solid var(--nbv5-line)!important;padding:10px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}.thread-last{text-align:right!important}.thread-numbers{display:flex!important;gap:12px!important}
  .board-context{padding:16px!important}.board-context-stats{grid-template-columns:repeat(2,1fr)!important}

  /* Thread title/action area. */
  .thread-nav-strip{padding:8px 10px!important}.thread-nav-tools{display:none!important}.thread-hero-v8{padding:18px 14px!important}.thread-hero-art-v8{display:none!important}.thread-head h1,.editorial-thread-head h1{font-size:30px!important;line-height:1.16!important}.thread-title-meta{display:flex!important;flex-wrap:wrap!important;gap:7px!important;font-size:14px!important}.thread-hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;margin-top:13px!important}.thread-hero-actions .btn,.thread-hero-actions form,.thread-hero-actions button{width:100%!important;min-height:46px!important}.thread-command-bar{position:sticky!important;top:60px!important;z-index:35!important}

  /* Author rail becomes a compact identity header, then the post reads full width. */
  .post,.post-card,.message-post,.nbv5-v2 .post{display:block!important}
  .userbox,.post-author,.author-column{display:grid!important;grid-template-columns:60px minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:12px!important;align-items:center!important;text-align:left!important;padding:13px 14px!important;border-right:0!important;border-bottom:1px solid var(--nbv5-line)!important}
  .userbox .avatar,.post-author .avatar,.author-column .avatar{width:58px!important;height:58px!important;grid-row:1/3!important;grid-column:1!important;margin:0!important}.userbox h3,.post-author h3,.author-column h3{grid-column:2!important;grid-row:1!important;margin:0!important;font-size:19px!important}.userbox .role,.post-author .role,.author-column .role,.userbox small,.post-author small,.author-column small{grid-column:2!important;grid-row:2!important;margin:0!important;font-size:14px!important}.userbox .authorstats,.post-author .authorstats,.author-column .authorstats,.userbox .badges,.post-author .badges,.author-column .badges{display:none!important}
  .postmeta,.post-meta,.post-header{padding:10px 14px!important;min-height:44px!important;font-size:14px!important}.prose,.post-content,.post-body,.nbv5-v2 .prose{padding:18px 14px!important;font-size:18px!important;line-height:1.72!important;max-width:none!important}.post-actions,.postfoot,.post-footer{padding:9px 10px!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:6px!important}.post-actions button,.postfoot button,.post-footer button,.post-actions a,.postfoot a,.post-footer a{min-height:44px!important;padding:7px 5px!important;font-size:13px!important;text-align:center!important}

  /* Composer and forms are full width and touch-friendly. */
  .summernote-editor,textarea,input,select{font-size:16px!important}.editor-toolbar,.composer-toolbar{overflow-x:auto!important}.form-two,.form-grid{grid-template-columns:1fr!important}.btn.primary,.primary-link{min-height:46px!important}

  /* Profiles become stacked sections. */
  .profile-hero,.profilehero{display:block!important;padding:20px 14px!important;text-align:left!important}.profileleft{text-align:left!important}.profileleft .avatar{margin:0 0 12px!important}.profile-hero h1,.profilehero h1{font-size:32px!important}.profilefacts,.facts{grid-template-columns:repeat(2,1fr)!important}.profile-tabs,.profiletabs{overflow-x:auto!important;white-space:nowrap!important}.profile-tabs a,.profile-tabs button,.profiletabs button{flex:0 0 auto!important;min-height:48px!important}

  /* Drawers become bottom sheets. */
  .mobile-nav{font-size:16px!important}.mobile-nav a,.mobile-nav button{min-height:48px!important;font-size:15px!important}
  .drawer:not(.mobile-nav){top:auto!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;max-height:88dvh!important;border-left:0!important;border-top:1px solid var(--nbv5-line2)!important;border-radius:18px 18px 0 0!important;transform:translateY(102%)!important}.drawer.is-open:not(.mobile-nav),.drawerback.show .drawer:not(.mobile-nav){transform:none!important}
  .menu-panel{font-size:15px!important}

  /* V2 cutover header becomes compact too. */
  .nbv5-v2 .nb2-brand{min-height:60px!important;padding:8px 12px!important;gap:12px!important;flex-wrap:wrap!important}.nbv5-v2 .nb2-brand nav{order:3;width:100%;display:flex;overflow-x:auto}.nbv5-v2 .nb2-brand a{font-size:14px!important;margin-right:12px!important}.nbv5-v2 .nb2-shell{padding:18px 10px 92px!important}.nbv5-v2 .nb2-row{display:block!important}.nbv5-v2 .nb2-stats{text-align:left!important;margin-top:9px!important;min-width:0!important}
}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Text-size preference is independent from density. */
html[data-text-size="large"] body{font-size:17px}
html[data-text-size="large"] .prose,html[data-text-size="large"] .post-content,html[data-text-size="large"] .post-body,html[data-text-size="large"] .nbv5-v2 .prose{font-size:19px!important}
html[data-text-size="extra"] body{font-size:18px}
html[data-text-size="extra"] .prose,html[data-text-size="extra"] .post-content,html[data-text-size="extra"] .post-body,html[data-text-size="extra"] .nbv5-v2 .prose{font-size:20px!important;line-height:1.76!important}
