:root {
  --bg: #f4f1e8;
  --paper: #fffdf6;
  --ink: #171916;
  --muted: #6f736b;
  --line: #d6d0bd;
  --green: #247746;
  --green-dark: #0f4d2b;
  --amber: #b27722;
  --red: #9b2d2d;
  --shadow: 0 14px 40px rgba(30, 28, 21, .14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23,25,22,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,25,22,.035) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: rgba(17, 18, 16, .93);
  backdrop-filter: blur(16px);
  color: #fffdf6;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18);
}

.brand strong {
  display: block;
  font-size: 23px;
  letter-spacing: 0;
}

.brand small {
  color: #c7cdbd;
  font-size: 12px;
}

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

.top-nav a {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  text-decoration: none;
  color: #f6f4e7;
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fffdf6;
  background: #10120f;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,10,.92) 0%, rgba(10,12,10,.72) 38%, rgba(10,12,10,.18) 100%),
    url("assets/hero-finance-board.png") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 82px 22px 36px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 10px;
  border: 1px solid rgba(174, 204, 155, .35);
  border-radius: 4px;
  color: #d7f0c8;
  font-weight: 700;
  font-size: 13px;
  background: rgba(36,119,70,.2);
}

h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  line-break: anywhere;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: #e8e7dd;
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.site-footer {
  max-width: 1440px;
  margin: 24px auto 0;
  padding: 22px;
  color: #666a61;
  font-size: 13px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
}

.primary-btn {
  background: #e8f3d4;
  color: #102014;
}

.ghost-btn {
  border: 1px solid rgba(255,255,255,.28);
  color: #fffdf6;
  background: rgba(255,255,255,.08);
}

.pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 1px;
  max-width: 680px;
  margin: 54px 0 0;
  padding: 0;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.2);
}

.pulse div {
  padding: 14px;
  background: rgba(12,13,11,.72);
}

.pulse dt {
  color: #b8bdaa;
  font-size: 12px;
}

.pulse dd {
  margin: 6px 0 0;
  font: 700 22px ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.ticker {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 10px 22px;
  background: #e6e0cc;
  border-block: 1px solid var(--line);
  white-space: nowrap;
}

.ticker span {
  padding: 6px 10px;
  border-radius: 4px;
  background: #fff9e8;
  border: 1px solid #d0c6a9;
  font-size: 13px;
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.single-layout {
  grid-template-columns: 250px minmax(0, 1fr);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.sidebar,
.rightbar {
  display: grid;
  gap: 14px;
}

.side-block,
.board-head,
.thread,
.post-box {
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, .96);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}

.side-block {
  padding: 14px;
  border-radius: 6px;
}

.image-card {
  padding: 0;
  overflow: hidden;
}

.image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.side-block h2,
.board-head h2,
.post-box h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.thread-title {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}

.thread-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.thread-nav a {
  padding: 5px 8px;
  border: 1px solid #d8ceb5;
  border-radius: 4px;
  background: #fffdf6;
  color: var(--green-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.inline-form {
  display: inline;
  margin: 0;
}

.inline-form button {
  padding: 5px 8px;
  border: 1px solid #d8ceb5;
  border-radius: 4px;
  background: #fffdf6;
  color: var(--green-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.side-block p {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 0;
  font-size: 13px;
}

.board-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #ebe4d1;
  text-decoration: none;
  font-size: 14px;
}

.board-link:first-of-type { margin-top: 10px; }
.board-link.active { color: var(--green-dark); font-weight: 700; }
.board-link b { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.plain-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.content {
  min-width: 0;
}

.board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 6px 6px 0 0;
  background: #fffaf0;
}

.path {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 13px;
}

.sort-tabs {
  display: flex;
  gap: 6px;
}

.sort-tabs button {
  min-width: 58px;
  height: 34px;
  border: 1px solid #cfc5aa;
  border-radius: 4px;
  background: #f9f2df;
  color: #33362f;
  cursor: pointer;
}

.sort-tabs .selected {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

.thread {
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.res {
  padding: 15px 18px;
  border-top: 1px solid #e7dfca;
  background: #fffdf6;
}

.res:first-child {
  border-top: 0;
}

.res.picked {
  background: linear-gradient(90deg, rgba(36,119,70,.08), #fffdf6 34%);
  border-left: 4px solid var(--green);
}

.res-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #666a61;
  font-size: 13px;
}

.res-meta b {
  color: var(--green-dark);
  font: 700 15px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.res-meta span {
  color: #247746;
  font-weight: 700;
}

.res-meta code {
  color: #777265;
  font-size: 12px;
}

.res p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.85;
}

.anchor {
  color: #1b5fa8;
  font-weight: 700;
  text-decoration: none;
}

.res-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.res-tags a {
  padding: 4px 7px;
  border-radius: 4px;
  background: #edf4e8;
  color: var(--green-dark);
  text-decoration: none;
  font-size: 12px;
}

.res-tools {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  color: #777265;
  font-size: 12px;
}

.res-tools a {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.post-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 6px;
}

.post-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.post-title p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #3a3d36;
  font-weight: 700;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cfc5aa;
  border-radius: 4px;
  padding: 10px 11px;
  background: #fffef9;
  color: var(--ink);
  font: inherit;
}

textarea {
  margin-top: 12px;
  resize: vertical;
  line-height: 1.7;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: #55594f;
}

.check input {
  width: auto;
}

.post-actions button {
  min-width: 130px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--green-dark);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.ranking {
  margin: 12px 0 0;
  padding-left: 20px;
}

.ranking li {
  margin: 0 0 10px;
}

.ranking a {
  display: block;
  color: #1c2a20;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.ranking span {
  color: var(--amber);
  font: 700 12px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.quote-panel {
  border-color: rgba(36,119,70,.35);
  background: #f7fbef;
}

.quote-panel a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

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

.page-title {
  min-height: 230px;
  padding: 34px;
  border: 1px solid rgba(214,208,189,.72);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255,253,246,.97), rgba(255,253,246,.78)),
    url("assets/category-banner.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.page-title.compact {
  min-height: 180px;
}

.page-title h1 {
  color: var(--ink);
  font-size: clamp(36px, 6vw, 64px);
}

.page-title a,
.path a {
  color: var(--green-dark);
  text-decoration: none;
}

.page-title p:last-child {
  max-width: 720px;
  margin: 14px 0 0;
  color: #464a42;
  line-height: 1.8;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.board-tile {
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}

.board-tile.hot {
  border-color: rgba(36,119,70,.45);
  background: linear-gradient(135deg, #f8ffef, #fffdf6);
}

.board-tile.quiet {
  border-style: dashed;
}

.board-tile span,
.board-tile strong,
.board-tile small {
  display: block;
}

.board-tile span {
  font-size: 20px;
  font-weight: 700;
}

.board-tile strong {
  margin-top: 22px;
  color: var(--green-dark);
  font: 700 24px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.board-tile small {
  margin-top: 8px;
  color: var(--muted);
}

.thread-list-wrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}

.thread-list-head,
.thread-row {
  display: grid;
  grid-template-columns: 82px 68px 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.thread-list-head {
  padding: 10px 14px;
  background: #1a1c18;
  color: #fffdf6;
  font-size: 12px;
  font-weight: 700;
}

.thread-row {
  min-height: 52px;
  padding: 10px 14px;
  border-top: 1px solid #e7dfca;
  color: var(--ink);
  text-decoration: none;
}

.thread-row:hover {
  background: #f9f5e8;
}

.thread-row b {
  color: var(--amber);
  font: 700 13px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.thread-row span,
.thread-row time {
  color: #696d63;
  font: 13px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.thread-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.thread-row.live {
  background: linear-gradient(90deg, rgba(36,119,70,.09), #fffdf6 45%);
}

.thread-row.archived {
  color: #777265;
  background: #fbf7ea;
}

.latest-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.latest-list a {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid #ebe4d1;
  text-decoration: none;
}

.latest-list b {
  color: var(--green-dark);
  font-size: 13px;
}

.latest-list span {
  color: #3a3d36;
  font-size: 13px;
  line-height: 1.55;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.policy-block {
  margin-top: 18px;
}

.new-thread-box {
  margin-top: 18px;
}

.top-ranking {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .rightbar {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow: auto;
    flex-wrap: nowrap;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 56px;
  }

  .pulse {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .board-head,
  .post-title {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .thread-list-head {
    display: none;
  }

  .thread-row {
    grid-template-columns: 64px 52px 1fr;
    gap: 7px 10px;
    padding: 12px;
  }

  .thread-row strong {
    grid-column: 1 / -1;
    grid-row: 1;
    overflow-wrap: anywhere;
  }

  .thread-row b,
  .thread-row span,
  .thread-row time {
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .brand strong { font-size: 20px; }
  .brand img { width: 46px; height: 46px; }
  h1 { font-size: 42px; }
  .page-title h1 { font-size: 38px; }
  .hero-actions a { width: 100%; }
  .pulse { grid-template-columns: 1fr; }
  .sort-tabs { overflow: auto; }
  .res { padding: 13px; }
  .res p { font-size: 14px; }
  .thread-list-wrap { overflow: visible; }
}
