:root {
  --ink: #1c1917;
  --muted: #5c564e;
  --paper: #f7f3ee;
  --white: #fffcf8;
  --line: #ddd6cc;
  --teal: #1f4a4a;
  --teal-dark: #163838;
  --sand: #e8dfd3;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto; }

.broker-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.broker-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
}
.broker-bar img {
  height: 16px;
  width: auto;
}
.broker-bar a {
  color: var(--muted);
  text-decoration: none;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 0.82rem; letter-spacing: 0.04em; }
.brand-text span { font-size: 0.72rem; color: var(--muted); }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.15rem;
  align-items: center;
}
nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
}
nav a:hover, nav a[aria-current="page"] { color: var(--teal); }
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff !important;
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}
.btn:hover { background: var(--teal-dark); }
.btn-ghost {
  background: transparent;
  color: var(--teal) !important;
  border: 1px solid var(--teal);
}
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.6rem;
  font: inherit;
}

.hero {
  padding: 3.2rem 0 2.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--white), var(--paper));
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 1rem;
}
.lede { font-size: 1.15rem; max-width: 42rem; color: var(--muted); }
.meta-line { color: var(--muted); font-size: 0.95rem; margin-top: 1.2rem; }

.section { padding: 2.6rem 0; }
.section + .section { border-top: 1px solid var(--line); }
h2 { font-size: 1.45rem; font-weight: 400; margin: 0 0 1rem; }
h3 { font-size: 1.12rem; font-weight: 600; margin: 1.4rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul.plain { margin: 0 0 1rem; padding-left: 1.2rem; }
ul.plain li { margin-bottom: 0.35rem; }

.grid-2, .grid-3 {
  display: grid;
  gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem 1.3rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.limit {
  background: var(--sand);
  border-left: 3px solid var(--teal);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.limit p:last-child { margin-bottom: 0; }

blockquote {
  margin: 0;
  padding: 0;
  font-style: italic;
  color: var(--ink);
}
.cite { display: block; margin-top: 0.6rem; font-style: normal; color: var(--muted); font-size: 0.9rem; }

form label { display: block; font-size: 0.92rem; margin: 0.85rem 0 0.3rem; }
form input, form select, form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
}
form textarea { min-height: 8rem; }
.hidden { display: none; }
.form-note { font-size: 0.88rem; color: var(--muted); }

.post-list article { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin-bottom: 0.3rem; }
.post-list h2 a { text-decoration: none; color: var(--ink); }
.date { color: var(--muted); font-size: 0.88rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.4rem;
  background: var(--white);
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}
.site-footer h2 { font-size: 1rem; }
.site-footer a { text-decoration: none; }
.tiny { font-size: 0.82rem; color: var(--muted); margin-top: 1.2rem; }

.portrait-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.6rem;
  align-items: start;
}
.portrait {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
}
.portrait-caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

@media (max-width: 800px) {
  .menu-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  nav.open { display: block; }
  nav ul { flex-direction: column; align-items: flex-start; padding: 0.75rem 1.25rem 1rem; gap: 0.7rem; }
  .grid-2, .grid-3, .footer-grid, .portrait-row { grid-template-columns: 1fr; }
  .portrait-row img { max-width: 280px; }
  .brand-text strong { font-size: 0.75rem; }
}
