:root {
  color-scheme: light;
  --ink: #172c39;
  --muted: #657582;
  --line: #dce5e8;
  --paper: #ffffff;
  --wash: #f3f7f8;
  --navy: #0d3444;
  --teal: #087e84;
  --teal-dark: #05676e;
  --danger: #a32836;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--wash); line-height: 1.55; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { background: var(--navy); color: white; border-bottom: 4px solid #12a7a0; }
.header-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { color: white; display: inline-flex; align-items: center; gap: 12px; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--navy); background: #8ae1d4; font-weight: 900; font-size: 24px; }
.brand strong { display: block; line-height: 1; font-size: 19px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 5px; color: #a8c5cf; font-size: 9px; letter-spacing: .22em; font-weight: 700; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.site-header nav a, .site-header nav button { display: inline-block; padding: 9px 12px; color: #e0eef2; font-size: 14px; font-weight: 600; border-radius: 7px; }
.site-header nav a:hover, .site-header nav button:hover { background: #245363; text-decoration: none; }
.site-header nav form { display: inline; }
.text-button { border: 0; background: transparent; color: var(--teal-dark); font-size: 14px; font-weight: 700; padding: 3px 6px; }
main.shell { min-height: calc(100vh - 170px); padding-block: 42px 80px; }
.footer { padding: 24px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-block; color: var(--teal-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-lead { margin-bottom: 26px; }
.page-lead h1 { margin: 7px 0 4px; font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -.035em; }
.page-lead p { margin: 0; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.breadcrumbs a { color: var(--muted); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 5px 25px rgba(16, 57, 69, .035); }
.board-list { display: grid; gap: 14px; }
.board-card { display: flex; align-items: center; gap: 20px; min-height: 112px; padding: 20px 24px; background: white; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s; }
.board-card:hover { border-color: #8accc9; box-shadow: 0 10px 30px rgba(16, 57, 69, .08); transform: translateY(-2px); text-decoration: none; }
.board-icon { flex: none; display: grid; place-items: center; width: 55px; height: 55px; color: var(--teal-dark); background: #e6f5f2; border-radius: 12px; font-weight: 850; font-size: 21px; }
.board-card-main { flex: 1; min-width: 0; }
.board-card h2 { margin: 0 0 2px; font-size: 19px; }
.board-card p { margin: 0; color: var(--muted); font-size: 13px; }
.arrow { font-size: 24px; color: var(--teal); }
.heading-actions { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 17px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 14px; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button.primary { color: white; background: var(--teal-dark); }
.button.primary:hover { background: #04535a; }
.button.secondary { color: var(--teal-dark); background: #edf8f6; border-color: #c1dedb; }
.button.secondary:hover { background: #dff1ee; }
.topic-list { overflow: hidden; }
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 145px; gap: 14px; align-items: center; min-height: 85px; padding: 17px 22px; color: var(--ink); border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { text-decoration: none; background: #f9fcfc; }
.topic-row h2 { margin: 0; font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.topic-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topic-meta { text-align: center; line-height: 1.1; }
.topic-meta strong { display: block; font-size: 17px; }
.topic-meta span, .topic-row time { color: var(--muted); font-size: 12px; }
.topic-row time { text-align: right; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 24px 0; color: var(--muted); font-size: 13px; }
.pager a { font-weight: 700; }
.post-list { display: grid; gap: 14px; }
.post { padding: 22px 25px 25px; scroll-margin-top: 20px; }
.post-head, .post-head > div { display: flex; align-items: center; gap: 10px; }
.post-head { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 18px; }
.post-head strong { font-size: 14px; }
.post-head time, .post-number { color: var(--muted); font-size: 12px; }
.post-edit, .edited { color: var(--muted); font-size: 12px; }
.edited { display: block; margin-top: 16px; }
.avatar { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #d9eeea; color: var(--teal-dark); font-weight: 800; }
.post-body { overflow-wrap: anywhere; white-space: normal; font-size: 15px; }
.post-body:empty { display: none; }
.attachment { display: inline-grid; gap: 5px; margin-top: 18px; font-size: 12px; }
.attachment img { display: block; max-width: min(100%, 650px); max-height: 600px; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; }
.reply-card, .form-card, .search-form { padding: 25px; }
.reply-card { margin-top: 28px; }
.reply-card h2, .form-card h2 { margin: 0 0 18px; font-size: 21px; }
label { display: block; color: var(--ink); font-size: 13px; font-weight: 700; }
input:not([type="checkbox"]):not([type="file"]), select, textarea { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); background: white; border: 1px solid #b9cbd1; border-radius: 7px; outline-color: var(--teal); }
textarea { resize: vertical; min-height: 110px; }
form label + label { margin-top: 18px; }
.form-card { max-width: 780px; }
.form-actions, .reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; }
.file-label { color: var(--teal-dark); }
.file-label input { display: block; font-size: 12px; margin-top: 4px; }
.muted, .form-help { color: var(--muted); font-size: 13px; }
.auth-layout { display: grid; grid-template-columns: 1fr 410px; min-height: 480px; overflow: hidden; border-radius: 16px; background: var(--navy); }
.auth-intro { position: relative; padding: 75px 60px; color: white; overflow: hidden; }
.auth-intro .eyebrow { color: #81dbcf; }
.auth-intro h1 { max-width: 470px; font-size: clamp(34px, 5vw, 52px); line-height: 1.09; letter-spacing: -.04em; }
.auth-intro p { max-width: 390px; color: #bbd1d7; }
.auth-pattern { position: absolute; width: 300px; height: 300px; left: -65px; bottom: -190px; border: 65px solid rgba(105, 213, 197, .2); border-radius: 50%; }
.login-card { border-radius: 0; box-shadow: none; padding: 65px 43px; }
.login-card h2 { margin: 0 0 28px; font-size: 25px; }
.login-card .button { width: 100%; margin-top: 23px; }
.login-card .form-help { margin-top: 25px; }
.notice { padding: 14px 18px; margin-bottom: 22px; border-radius: 8px; background: #e9f4f1; color: #20564f; border: 1px solid #c7e2db; }
.notice.error { color: #8a2430; background: #fff0f1; border-color: #f0c9ce; }
.empty { padding: 32px; color: var(--muted); }
.search-form { display: grid; grid-template-columns: 1fr 250px auto; align-items: end; gap: 16px; }
.search-result { display: block; padding: 18px 23px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #f9fcfc; text-decoration: none; }
.search-result h2 { color: var(--ink); font-size: 17px; margin: 4px 0 2px; }
.search-result p, .result-count { color: var(--muted); font-size: 13px; }
.result-count { margin: 25px 0 10px; }
.admin-grid { display: grid; grid-template-columns: 350px 1fr; gap: 20px; align-items: start; }
.admin-section { padding: 23px; }
.admin-section h2 { margin: 0 0 20px; font-size: 20px; }
.admin-user { padding: 19px 0; border-top: 1px solid var(--line); }
.admin-user:first-of-type { border-top: 0; padding-top: 0; }
.admin-user-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.admin-user-head span { color: var(--muted); font-size: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 9px 16px; margin: 12px 0; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; }
.check input { accent-color: var(--teal-dark); }
.admin-user .button { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 790px) {
  .header-inner { align-items: flex-start; padding: 15px 0; flex-direction: column; }
  .site-header nav { margin-left: -12px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { padding: 40px; min-height: 225px; }
  .login-card { padding: 35px 40px; }
  .search-form, .admin-grid { grid-template-columns: 1fr; }
  .heading-actions { flex-direction: column; }
}
@media (max-width: 590px) {
  .shell { width: min(100% - 24px, 1120px); }
  main.shell { padding-top: 25px; }
  .board-card { padding: 17px; gap: 12px; }
  .board-icon { width: 43px; height: 43px; font-size: 16px; }
  .board-card h2 { font-size: 16px; }
  .board-card p { font-size: 11px; }
  .topic-row { grid-template-columns: 1fr 55px; padding: 15px; }
  .topic-row time { grid-column: 1 / -1; text-align: left; }
  .post { padding: 16px; }
  .post-head, .post-head > div { flex-wrap: wrap; }
  .reply-actions { align-items: stretch; flex-direction: column; }
  .auth-intro, .login-card { padding: 30px 22px; }
}
