:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #263844;
  background: #fff;
  font-size: 16px;
  --blue: #205c7b;
  --line: #dce3e7;
  --muted: #647580;
  --light: #f3f6f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  border: 1px solid #bbcbd4;
  background: white;
  color: #315164;
  padding: 9px 13px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-size: 0.875rem;
  text-decoration: none;
  line-height: 1.25;
}
button:hover,
.button:hover {
  background: #edf3f6;
  text-decoration: none;
}
button.primary,
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
input,
textarea,
select {
  border: 1px solid #bbc8d0;
  border-radius: 4px;
  padding: 10px 12px;
  max-width: 100%;
  background: white;
  color: #263844;
}
textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  line-height: 1.6;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 17px 0 7px;
}
input:not([type="checkbox"]) {
  width: 100%;
}
header {
  border-top: 4px solid #244e65;
  border-bottom: 1px solid var(--line);
}
.topbar {
  max-width: 1400px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 35px;
  margin: auto;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  color: #183f55;
  font:
    bold 1.65rem Georgia,
    serif;
  white-space: nowrap;
}
.brand small {
  display: block;
  font:
    0.78rem Arial,
    sans-serif;
  color: var(--muted);
  margin-top: 7px;
}
.mark {
  font:
    2.3rem Georgia,
    serif;
  border-right: 1px solid #cad6dd;
  padding-right: 15px;
  letter-spacing: -5px;
}
.mark span {
  font-size: 1.55rem;
  padding-right: 3px;
}
.topbar form {
  display: flex;
  flex: 1;
  max-width: 400px;
  margin-left: auto;
}
.topbar form input {
  border-radius: 4px 0 0 4px;
  background: #f8fafb;
}
.topbar form button {
  border-radius: 0 4px 4px 0;
  border-left: 0;
}
#account {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}
.account-tool {
  font-size: 0.78rem;
  white-space: nowrap;
}
.mention {
  background: #e8f1f5;
  border-radius: 3px;
  padding: 1px 3px;
  font-weight: 600;
}
.shell {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr) 265px;
  gap: 30px;
  max-width: 1400px;
  margin: auto;
  padding: 30px 32px 65px;
  min-height: 80vh;
}
nav {
  border-right: 1px solid var(--line);
  padding-right: 18px;
}
nav a {
  display: block;
  padding: 11px 13px;
  margin-bottom: 5px;
  color: #536570;
  font-size: 0.9rem;
  border-radius: 3px;
}
nav a.active {
  color: #183f55;
  background: #eaf1f5;
  font-weight: 600;
  border-left: 3px solid #2d6685;
  padding-left: 10px;
}
.nav-label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7a8790;
  margin: 30px 13px 12px;
}
.nav-note {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--muted);
  padding: 0 13px;
}
h1 {
  font:
    normal 1.9rem/1.25 Georgia,
    serif;
  color: #203e50;
  margin: 0 0 12px;
}
h2 {
  font:
    normal 1.4rem Georgia,
    serif;
  margin: 0 0 16px;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.65;
  margin: 0 0 16px;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 0.8rem;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 2px 0 24px;
}
.heading p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--muted);
}
.heading .button {
  white-space: nowrap;
}
.intro {
  background: #f1f6f9;
  border: 1px solid #dbe7ee;
  border-left: 3px solid #487a96;
  padding: 18px 20px;
  margin-bottom: 25px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.intro strong {
  display: block;
  color: #244e65;
  margin-bottom: 4px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 3px;
}
.tabs a {
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 3px;
}
.tabs a.selected {
  background: #eaf0f4;
  color: #244e65;
  font-weight: bold;
}
.thread {
  display: flex;
  gap: 19px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.stats {
  flex: 0 0 65px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 2px;
}
.stats span {
  display: block;
  margin-bottom: 10px;
}
.stats b {
  font-size: 1.1rem;
  color: #344b5a;
  font-weight: normal;
}
.stats .answered {
  border: 1px solid #adc8c1;
  color: #347565;
  border-radius: 3px;
  padding: 5px;
  font-size: 0.73rem;
}
.thread-body {
  min-width: 0;
  flex: 1;
}
.thread h2 {
  font:
    normal 1.14rem/1.4 Arial,
    sans-serif;
  margin: 0 0 8px;
}
.excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #60717d;
  margin-bottom: 12px;
}
.thread-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag {
  font-size: 0.75rem;
  padding: 4px 7px;
  border-radius: 3px;
  background: #ecf2f6;
  color: #42657b;
  display: inline-block;
}
.byline {
  font-size: 0.75rem;
  color: var(--muted);
}
aside section {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 22px;
  padding: 19px;
  font-size: 0.875rem;
}
aside h2 {
  font:
    600 0.9rem Arial,
    sans-serif;
  margin-bottom: 12px;
}
aside p {
  font-size: 0.85rem;
  color: #60717d;
  line-height: 1.7;
}
aside ul {
  padding-left: 18px;
  color: #60717d;
  line-height: 1.7;
  margin-bottom: 0;
}
aside .tags {
  gap: 8px;
}
.aside-foot {
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
  padding: 0 4px;
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.8;
}
.post-layout {
  display: flex;
  gap: 22px;
  margin-top: 26px;
}
.vote {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  flex: 0 0 42px;
}
.vote button {
  padding: 5px 10px;
  font-size: 1.1rem;
}
.vote .chosen {
  background: #d9eaf3;
  color: #183f55;
}
.vote strong {
  font-size: 1.35rem;
  font-weight: normal;
}
.post-main {
  min-width: 0;
  flex: 1;
}
.author-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
  font-size: 0.85rem;
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  width: 36px;
  background: #e6eef3;
  color: #376079;
  border-radius: 5px;
  font:
    1rem Georgia,
    serif;
}
.role {
  font-size: 0.7rem;
  border: 1px solid #cbd6dc;
  border-radius: 3px;
  padding: 2px 5px;
  color: #637681;
  display: inline-block;
  margin-left: 6px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.text-button {
  border: 0;
  padding: 4px 0;
  background: none;
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 12px;
}
.replies {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 23px;
}
.reply {
  border-bottom: 1px solid var(--line);
  padding: 5px 0 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
}
.reply-content {
  min-width: 0;
  flex: 1;
}
.reply-vote {
  flex: 0 0 32px;
  text-align: center;
}
.reply-vote button {
  display: block;
  padding: 4px 8px;
  margin-bottom: 4px;
}
.reply-vote .chosen {
  background: #d9eaf3;
  color: #183f55;
}
.form-card {
  max-width: 740px;
}
.help {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 15px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
}
.error {
  background: #fff1ef;
  color: #9a392b;
  padding: 12px;
  border-radius: 3px;
  margin: 15px 0;
  font-size: 0.9rem;
}
.success {
  background: #edf6f1;
  padding: 12px;
  color: #356b55;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  background: #f8fafb;
  border: 1px dashed var(--line);
  margin-top: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.card .author-card {
  margin-top: 0;
}
.card p {
  font-size: 0.875rem;
}
.tag-card h2 {
  font-family: Arial, sans-serif;
  font-size: 1rem;
}
.report {
  padding: 20px;
  border: 1px solid var(--line);
  margin: 16px 0;
  border-radius: 4px;
}
.report h3 {
  margin: 0 0 10px;
}
.log-entry {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.6;
}
.policy h2 {
  margin-top: 30px;
}
.policy ul {
  line-height: 1.8;
  padding-left: 22px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 32px;
  max-width: 1400px;
  margin: auto;
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
#notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #213f50;
  color: white;
  border-radius: 5px;
  padding: 12px 20px;
  max-width: 90%;
  box-shadow: 0 3px 18px #0002;
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: #263844;
}
dialog::backdrop {
  background: #10253366;
}
dialog textarea {
  min-height: 100px;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip:focus {
  display: block;
  padding: 10px;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid #73a8c6;
  outline-offset: 3px;
}
.hidden-note {
  background: #fff3d9;
  padding: 12px;
  margin: 10px 0;
  font-size: 0.875rem;
}
code {
  overflow-wrap: anywhere;
}
@media (min-width: 1500px) {
  .shell {
    padding-top: 38px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 23px;
  }
  aside {
    display: none;
  }
  .topbar {
    gap: 20px;
  }
  .brand small {
    font-size: 0.7rem;
  }
  .brand {
    font-size: 1.4rem;
  }
  .topbar form {
    max-width: 280px;
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 16px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .brand {
    font-size: 1.35rem;
    flex: 1;
  }
  .brand small {
    white-space: normal;
    line-height: 1.4;
  }
  .topbar form {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }
  .mark {
    font-size: 2rem;
  }
  #account {
    gap: 8px;
  }
  .shell {
    display: block;
    padding: 0 16px 35px;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 4px;
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
  }
  nav a {
    white-space: nowrap;
    padding: 9px 11px;
    margin: 0;
  }
  nav a.active {
    border-left: 0;
    border-bottom: 2px solid #2d6685;
    padding-left: 11px;
  }
  .nav-label,
  .nav-note {
    display: none;
  }
  h1 {
    font-size: 1.6rem;
  }
  .heading {
    gap: 10px;
  }
  .heading .button {
    padding: 10px;
  }
  .intro {
    padding: 15px;
  }
  .thread {
    gap: 12px;
    padding: 19px 0;
  }
  .stats {
    flex-basis: 53px;
  }
  .thread h2 {
    font-size: 1.03rem;
  }
  .excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .byline {
    line-height: 1.7;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .post-layout {
    gap: 13px;
  }
  .vote {
    flex-basis: 32px;
  }
  .prose {
    font-size: 1rem;
  }
  footer {
    padding: 20px 16px;
    flex-direction: column;
  }
  #account .profile-name {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Visible closure preserves context without presenting a closed thread as active. */
.closure-label {
  display: inline-block;
  font-size: 0.72rem;
  font-family: Arial, sans-serif;
  border: 1px solid #cfb58a;
  background: #faf2e4;
  color: #795721;
  border-radius: 3px;
  padding: 3px 6px;
  vertical-align: middle;
}
.closure-notice {
  border: 1px solid #d8bf98;
  border-left: 4px solid #9b7137;
  background: #fcf7ed;
  padding: 20px;
  margin: 20px 0;
}
.closure-notice h2 {
  font:
    600 1rem Arial,
    sans-serif;
  color: #6d4d23;
  margin: 0 0 10px;
}
.closure-notice p {
  margin-bottom: 10px;
}
.closure-notice small {
  line-height: 1.7;
  display: block;
}
.closure-summary {
  font-size: 0.8rem;
  color: #795721;
  line-height: 1.6;
  margin: 0 0 9px;
}
.thread-closed .excerpt {
  color: #707b83;
}
.stats .negative-score,
.stats .negative-score b {
  color: #a24439;
}

.tag-picker {
  position: relative;
  border: 1px solid #bbc8d0;
  border-radius: 4px;
  padding: 9px;
  background: white;
}
.tag-picker:focus-within {
  border-color: #487a96;
  box-shadow: 0 0 0 2px #dceaf2;
}
.tag-picker input[role="combobox"] {
  border: 0;
  outline: none;
  box-shadow: none;
  padding: 9px 3px;
}
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  background: #eaf1f6;
  color: #315e78;
  border-color: #c7d9e4;
  padding: 7px 9px;
}
.tag-chip span {
  font-size: 1rem;
  margin-left: 7px;
}
#tag-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 270px;
  overflow-y: auto;
  background: white;
  border: 1px solid #bbc8d0;
  border-radius: 4px;
  box-shadow: 0 5px 14px #183f5520;
  padding: 5px;
}
#tag-options [role="option"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  cursor: pointer;
  border-radius: 3px;
}
#tag-options [role="option"]:hover,
#tag-options [aria-selected="true"] {
  background: #edf3f7;
}
#tag-options small {
  white-space: nowrap;
}
.tag-empty {
  padding: 13px;
  font-size: 0.875rem;
  color: #647580;
}
#tag-count {
  display: block;
  padding: 3px;
  font-size: 0.78rem;
}

.ai-disclosure {
  margin: 0 0 20px;
  padding: 11px 15px;
  border: 1px solid #e3cf9e;
  border-radius: 4px;
  background: #fff8e8;
  color: #72551e;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
}
