:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6878;
  --line: #b8c2cf;
  --line-dark: #708097;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --hoerzone-blue: #46648c;
  --header: #253b57;
  --header-2: #d9e2ed;
  --accent: #0f6b66;
  --accent-dark: #084c49;
  --warn: #8b4b17;
  --soft: #eef3f7;
  --shadow: rgba(23, 32, 51, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(70, 100, 140, 0.92), rgba(70, 100, 140, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath fill='%23c9d2dc' d='M0 95h96v1H0zM95 0h1v96h-1z'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23a9b6c4'/%3E%3Ccircle cx='60' cy='36' r='1.2' fill='%23b3bfcc'/%3E%3C/svg%3E");
  background-color: var(--hoerzone-blue);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  background: linear-gradient(#55739b, var(--hoerzone-blue));
  color: white;
  border-bottom: 4px solid #243c5b;
}

.top-strip {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px max(18px, calc((100vw - 1180px) / 2));
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
}

.top-strip nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px;
}

.crest {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border: 2px solid #eff5fb;
  background: #f4f8fb;
  box-shadow: 0 4px 14px rgba(19, 36, 58, 0.28);
  overflow: hidden;
}

.crest img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1,
h2,
p {
  margin: 0;
}

.brand-row h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
}

.brand-row p {
  margin-top: 5px;
  color: #dbe7f4;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.notice-bar,
.utility-row,
.board-head,
.thread-head {
  border: 1px solid var(--line-dark);
  background: var(--header-2);
}

.notice-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px 12px;
}

.utility-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
}

.search-box {
  display: grid;
  gap: 5px;
  min-width: min(100%, 360px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

.primary-button,
.secondary-button,
.dialog-head button,
menu button {
  border: 1px solid #0b403d;
  background: var(--accent);
  color: white;
  cursor: pointer;
  min-height: 38px;
  padding: 8px 13px;
  font-weight: 700;
}

.secondary-button,
menu button:first-child {
  border-color: var(--line-dark);
  background: #f7f9fb;
  color: var(--ink);
}

.primary-button:hover,
.forum-item:hover,
.topic-row button:hover {
  filter: brightness(0.96);
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.forum-list,
.board,
.thread-view {
  border: 1px solid var(--line-dark);
  background: var(--panel);
  box-shadow: 0 2px 10px var(--shadow);
}

.panel-title {
  padding: 10px 12px;
  background: var(--header);
  color: white;
  font-weight: 700;
}

.forum-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 13px 12px;
  text-align: left;
  cursor: pointer;
}

.forum-item.active {
  background: #e4f1ef;
  border-left: 5px solid var(--accent);
  padding-left: 7px;
}

.forum-item span {
  font-weight: 700;
}

.forum-item small {
  color: var(--muted);
  white-space: nowrap;
}

.board-head,
.thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
}

.board-head h2,
.thread-head h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.board-head p,
#breadcrumb {
  color: var(--muted);
  font-size: 13px;
}

.topic-table {
  width: 100%;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 88px 82px 170px;
  min-height: 62px;
  border-top: 1px solid var(--line);
}

.topic-row > span,
.topic-row > button {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.topic-row > :last-child {
  border-right: 0;
}

.table-head {
  min-height: 36px;
  background: var(--header);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.table-head span {
  color: white;
}

.topic-main {
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.topic-title {
  font-weight: 700;
}

.topic-meta {
  color: var(--muted);
  font-size: 13px;
}

.topic-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 9px;
  border: 1px solid var(--line-dark);
  background: #f3f6f9;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.thread-view {
  margin-top: 14px;
}

.posts {
  display: grid;
}

.post {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.author-box {
  padding: 14px 12px;
  background: var(--soft);
  border-right: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 9px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
}

.author-box strong {
  display: block;
}

.author-box span,
.post-date {
  color: var(--muted);
  font-size: 13px;
}

.post-body {
  padding: 14px;
  min-width: 0;
}

.post-date {
  display: block;
  margin-bottom: 10px;
}

.formatted-body {
  display: grid;
  gap: 12px;
}

.formatted-body h3 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.formatted-body p {
  line-height: 1.55;
  white-space: pre-line;
}

.formatted-body ul,
.formatted-body ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.55;
}

.formatted-body blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
  line-height: 1.55;
  white-space: pre-line;
}

.report-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.reply-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line-dark);
  background: #fbfcfd;
}

.reply-form label {
  font-weight: 700;
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.format-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.format-toolbar button:hover {
  background: var(--soft);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 32px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer div,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.site-footer a {
  color: var(--ink);
}

.legal-page {
  border: 1px solid var(--line-dark);
  background: var(--panel);
  box-shadow: 0 2px 10px var(--shadow);
}

.legal-page h2 {
  padding: 14px;
  background: var(--header);
  color: white;
  font-size: 24px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-grid section {
  padding: 16px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.legal-grid section:nth-child(2n) {
  border-right: 0;
}

.legal-grid h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.legal-grid p {
  line-height: 1.55;
}

.legal-grid a {
  overflow-wrap: anywhere;
}

dialog {
  width: min(560px, calc(100vw - 24px));
  border: 1px solid var(--line-dark);
  padding: 0;
  box-shadow: 0 14px 50px rgba(23, 32, 51, 0.35);
}

dialog::backdrop {
  background: rgba(13, 24, 39, 0.46);
}

.topic-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: white;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -14px -14px 0;
  padding: 11px 14px;
  background: var(--header);
  color: white;
}

.dialog-head h2 {
  font-size: 20px;
}

.dialog-head button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.topic-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

@media (max-width: 820px) {
  .top-strip,
  .utility-row,
  .board-head,
  .thread-head {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .forum-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-title {
    grid-column: 1 / -1;
  }

  .topic-row {
    grid-template-columns: minmax(0, 1fr) 74px 72px;
  }

  .topic-row > :last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .table-head > :last-child {
    display: none;
  }

  .post {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .legal-grid section {
    border-right: 0;
  }

  .author-box {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .avatar {
    margin-bottom: 0;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 10px;
  }

  .brand-row {
    align-items: flex-start;
    padding: 20px 12px;
  }

  .crest {
    width: 64px;
    height: 64px;
  }

  .forum-list {
    grid-template-columns: 1fr;
  }

  .topic-row {
    grid-template-columns: minmax(0, 1fr) 58px 58px;
  }

  .topic-row > span,
  .topic-row > button {
    padding: 9px 8px;
  }

  .form-actions,
  menu {
    flex-direction: column;
  }
}
