:root {
  --blue: #176fa4;
  --blue-dark: #0f5d8f;
  --nav: #333b40;
  --bg: #e9eef4;
  --surface: #ffffff;
  --text: #0f1720;
  --muted: #6d7b8d;
  --line: #d6dde6;
  --orange: #ff930f;
  --green: #5cc79b;
  --star: #c7ced8;
  --shadow: 0 2px 7px rgba(30, 42, 58, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(1000px, calc(100% - 32px));
}

.brand-strip {
  background: var(--blue);
  color: #fff;
}

.brand-row {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  gap: 18px;
}

.brand {
  justify-self: start;
}

.brand img {
  display: block;
  width: 232px;
  height: 54px;
  object-fit: contain;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.signup-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  padding: 0 18px;
}

.nav-strip {
  background: var(--nav);
  color: #fff;
}

.nav-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.main-nav,
.sub-nav,
.footer-inner nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
}

.search-box {
  display: flex;
  width: min(330px, 40vw);
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  color: #7a8490;
  padding: 0 16px;
  font-size: 0.82rem;
}

.subnav-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.subnav-row {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.sub-nav a {
  color: #697688;
  font-size: 0.82rem;
  font-weight: 700;
}

.sub-nav a:first-child {
  color: #111;
  font-weight: 900;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
}

.mobile-menu {
  background: var(--nav);
  padding-bottom: 12px;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 12px;
}

.mobile-menu a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 10px 12px;
  color: #fff;
  font-weight: 800;
}

.page-shell {
  padding: 28px 0 52px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #65758d;
  font-size: 0.82rem;
}

.breadcrumb a {
  color: #4d6685;
}

.topic-card,
.post,
.join-conversation {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topic-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #5c6e86;
  font-size: 0.82rem;
}

.mini-avatar,
.large-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.mini-avatar {
  width: 36px;
  height: 36px;
}

.large-avatar {
  width: 84px;
  height: 84px;
  margin: 18px auto 10px;
  font-size: 2.6rem;
}

.topic-rating {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: #65707d;
  font-weight: 800;
}

.stars {
  color: var(--orange);
  letter-spacing: 0;
  font-size: 1.2rem;
}

.stars .star-empty {
  color: var(--star);
}

.topic-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  align-items: center;
  padding: 18px 0 34px;
}

.topic-actions a {
  color: var(--blue);
  font-weight: 800;
}

.topic-actions .reply-topic {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 4px;
  background: #1478c7;
  color: #fff;
  padding: 0 28px;
}

.posts,
.reviews-list {
  display: grid;
  gap: 18px;
}

.post {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
}

.author-card {
  padding: 24px 18px;
  text-align: center;
}

.author-card strong {
  display: block;
  font-size: 1.05rem;
}

.author-card span,
.author-card small {
  display: block;
  color: #6b7788;
  font-size: 0.82rem;
}

.post-body {
  border-left: 1px solid var(--line);
  padding: 28px 24px;
}

.post-date {
  margin-bottom: 20px;
  color: #65758d;
  font-size: 0.82rem;
  font-weight: 700;
}

.post-body h2 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.post-body p {
  max-width: 820px;
  color: #111;
}

.site-summary {
  margin: 22px 0;
  border: 1px solid #d9e4ee;
  border-radius: 4px;
  background: #f7fbff;
  padding: 16px;
}

.site-summary > strong {
  display: block;
  margin-bottom: 12px;
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

dt {
  color: #6e7b8b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.post-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 14px;
}

.post-actions a {
  color: #55708f;
  font-size: 0.84rem;
  font-weight: 800;
}

.post-actions a:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: #e9f4ff;
  color: #1478c7;
}

.join-conversation {
  margin-top: 18px;
  padding: 22px 24px;
}

.join-conversation h2 {
  margin-bottom: 4px;
  font-size: 1.45rem;
}

.join-conversation p {
  color: #4d5c6e;
}

.join-conversation p a {
  color: var(--blue);
}

.reply-box {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.guest-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #333;
}

.reply-input {
  display: flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #8993a1;
  padding: 0 16px;
}

.bottom-links {
  display: flex;
  justify-content: space-between;
  margin: 28px 0;
  color: #51677f;
  font-size: 0.86rem;
  font-weight: 800;
}

.site-footer {
  padding: 26px 0 44px;
  color: #6c7887;
  text-align: center;
}

.footer-inner {
  display: grid;
  gap: 10px;
}

.footer-inner nav {
  justify-content: center;
}

@media (max-width: 900px) {
  .brand-row {
    grid-template-columns: 1fr 44px;
  }

  .brand {
    justify-self: start;
  }

  .member-actions,
  .nav-strip,
  .subnav-strip {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .topic-card {
    flex-direction: column;
  }

  .topic-rating {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .container,
  .narrow {
    width: min(100% - 20px, 1180px);
  }

  .brand img {
    width: min(232px, calc(100vw - 90px));
  }

  .mobile-menu nav,
  .post,
  dl,
  .reply-box {
    grid-template-columns: 1fr;
  }

  .post-body {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .topic-actions,
  .bottom-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
