:root {
  --ink: #1b2b34;
  --ink-soft: #56646a;
  --accent: #e8b01f;
  --accent-dark: #c99412;
  --paper: #f5f6f3;
  --paper-deep: #eceeea;
  --white: #ffffff;
  --line: #d9e1e0;
  --danger: #b42318;
  --ok: #1f6b4a;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(27, 43, 52, 0.08);
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Literata", Georgia, serif;
  --font-ui: "Open Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 176, 31, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(27, 43, 52, 0.06), transparent 50%),
    var(--paper);
  font-family: var(--font-ui);
  line-height: 1.55;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dark);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.page-frame {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

body.has-ads .wrap,
body.has-ads .page-frame {
  width: min(1360px, calc(100% - 2rem));
}

body.has-ads .page-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1.25rem;
  align-items: start;
}

body.has-ads .page-frame .wrap {
  width: 100%;
}

.ad-rail {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 0.75rem;
  padding: 3rem 0;
}

.ad-banner {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  min-height: 120px;
}

.ad-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-banner span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 1.1rem 0.9rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(245, 246, 243, 0.9);
  border-bottom: 1px solid rgba(27, 43, 52, 0.08);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.15rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a:hover {
  color: var(--accent-dark);
}

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: var(--white);
}

.nav-cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.nav a.account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a.account-link svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 16rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}

.user-menu-trigger svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.user-menu-trigger span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  min-width: 12rem;
  padding-top: 0.45rem;
}

.user-menu:hover .user-menu-panel,
.user-menu:focus-within .user-menu-panel {
  display: block;
}

.user-menu-list {
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.nav .user-menu-list a,
.user-menu-list button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav .user-menu-list a:hover,
.user-menu-list button:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.user-menu-list form {
  margin: 0;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: #243743;
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding-inline: 0.6rem;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero .lede {
  font-family: var(--font-body);
  font-size: 1.15rem;
  max-width: 42ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-panel {
  background: var(--ink);
  color: var(--white);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -30%;
  width: 60%;
  height: 80%;
  background: linear-gradient(135deg, transparent, rgba(232, 176, 31, 0.35));
  transform: rotate(18deg);
  pointer-events: none;
}

.hero-panel h2 {
  color: var(--white);
  font-size: 1.35rem;
  position: relative;
  z-index: 1;
}

.hero-panel p {
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 1.25rem;
  position: relative;
  z-index: 1;
}

.hero-stats div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
}

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
}

.hero-stats span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head > :first-child {
  min-width: 0;
  flex: 1;
}

.section-head .btn {
  flex-shrink: 0;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.4rem;
}

/* Cards / listings */
.grid,
.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-photo {
  display: block;
  margin: -1.25rem -1.25rem 0.9rem;
  aspect-ratio: 16 / 10;
  background: var(--paper);
}

.card-photo img,
.gallery img,
.photo-edit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

.gallery a {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}

.photo-edit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.photo-edit label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.photo-edit img {
  aspect-ratio: 1;
  border-radius: 10px;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card a.title-link {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.pill-accent {
  background: rgba(232, 176, 31, 0.25);
}

.pill-ink {
  background: var(--ink);
  color: var(--white);
}

.card .summary {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.forum-list {
  display: grid;
  gap: 0.75rem;
}

.forum-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  color: inherit;
}

.forum-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.forum-row strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.forum-row p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

.forum-meta {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
}

.forum-posts {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.forum-post {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem 1.15rem;
}

.forum-post header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.forum-post time,
.forum-reply-to {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.forum-reply {
  margin-top: 1.5rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.forum-reply-target {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Role paths */
.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.path {
  border-radius: 20px;
  padding: 1.75rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.path-investor {
  background: var(--ink);
  color: var(--white);
}

.path-investor p {
  color: rgba(255, 255, 255, 0.75);
}

.path-entrepreneur {
  background: linear-gradient(160deg, #fff 0%, #fff8e6 100%);
  border: 1px solid var(--line);
}

.path h3 {
  font-size: 1.6rem;
}

/* Forms */
.form-shell {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-shell.wide {
  max-width: 760px;
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(232, 176, 31, 0.55);
  border-color: var(--accent);
  background: var(--white);
}

.helptext,
.form-row .helptext,
.form-row span.helptext {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.role-choices ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.role-choices label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 600;
}

.role-choices input {
  width: auto;
  margin-top: 0.2rem;
}

.terms-box {
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}

.terms-scroll {
  max-height: 220px;
  overflow: auto;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.terms-scroll h2 {
  font-size: 1rem;
  margin-top: 0.85rem;
}

.terms-scroll h2:first-child {
  margin-top: 0;
}

.terms-accept {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  margin-bottom: 0;
}

.terms-accept input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.terms-accept label {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}

.terms-accept + .terms-accept {
  border-top: 1px solid var(--line);
}

.terms-dialog {
  border: 0;
  padding: 0;
  width: min(720px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.terms-dialog::backdrop {
  background: rgba(27, 43, 52, 0.48);
}

.terms-dialog-bar,
.terms-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
}

.terms-dialog-bar {
  border-bottom: 1px solid var(--line);
}

.terms-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.terms-dialog-body {
  padding: 1rem 1.2rem 1.25rem;
  overflow: auto;
  max-height: min(58vh, 520px);
}

.terms-dialog-body h2 {
  font-size: 1.15rem;
}

.terms-dialog .quienes-somos {
  display: none;
}

.legal-copy h2 {
  margin-top: 1.5rem;
}

.legal-copy {
  counter-reset: legal-sec;
}

.legal-copy h2::before {
  counter-increment: legal-sec;
  content: counter(legal-sec) ". ";
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.filters form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
}

.filters input[type="search"],
.filters select {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  min-width: 220px;
  flex: 1;
  max-width: 28rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.chip.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* Detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 1.5rem;
  align-items: start;
}

.detail-main,
.detail-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
}

.detail-side {
  position: sticky;
  top: 90px;
}

.prose {
  font-family: var(--font-body);
  font-size: 1.05rem;
  white-space: pre-wrap;
}

.legal-copy.prose,
.legal-copy.prose p {
  white-space: normal;
}

.prose p {
  color: var(--ink);
}

.kv {
  display: grid;
  gap: 0.65rem;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  font-size: 0.92rem;
}

.kv dt {
  color: var(--ink-soft);
}

.kv dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.funding {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.funding p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.funding-bar {
  height: 10px;
  margin: 0.75rem 0;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
}

.funding-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.funding-nums {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.funding-nums span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.need-block {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.need-block h2 {
  font-size: 1.2rem;
}

.need-form {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.7fr 0.7fr auto;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.need-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.need-delete {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.45rem;
}

.need-line {
  margin-top: 0.9rem;
}

.contact-count {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.contact-log {
  margin-top: 1rem;
}

.contact-log h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.contact-log a {
  display: block;
  margin-top: 0.35rem;
}

.contact-log p {
  margin: 0;
}

.funding-nums strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
}

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

/* Messages / alerts */
.messages {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 1rem auto 0;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.alert-success {
  background: #e8f6ef;
  color: var(--ok);
}

.alert-error,
.alert-danger {
  background: #fdeceb;
  color: var(--danger);
}

.alert-info {
  background: #eef3f6;
  color: var(--ink);
}

.alert-warning {
  background: #fff6df;
  color: #7a5a00;
  border: 1px solid rgba(232, 176, 31, 0.45);
}

/* Inbox */
.message-list {
  display: grid;
  gap: 0.65rem;
}

.message-item {
  display: block;
  padding: 1rem 1.15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}

.message-item.unread {
  border-left: 4px solid var(--accent);
}

.message-item strong {
  color: var(--ink);
}

.message-item span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Profile */
.profile-hero {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
  border: 3px solid var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ink);
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer .brand {
  color: var(--white);
}

.empty {
  padding: 2rem;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--ink-soft);
}

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.pagination a,
.pagination span {
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.pagination .current {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* Blog */
.blog-lead {
  margin-bottom: 0.25rem;
}

.blog-lead.has-cover {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  padding: 0;
  overflow: hidden;
}

.blog-lead.has-cover img,
.blog-thumb {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.blog-thumb {
  height: 160px;
  min-height: 0;
  border-radius: 10px;
  margin-bottom: 0.85rem;
}

.blog-lead-copy {
  padding: 1.6rem 1.5rem;
}

.blog-lead-title {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.article {
  width: min(44rem, 100%);
  margin-inline: auto;
}

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1.25rem;
}

.article h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-top: 0.8rem;
}

.article-byline {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.article-byline a {
  color: inherit;
}

.article-lead {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.article-body {
  font-family: var(--font-body);
  font-size: 1.08rem;
}

.article-body h2,
.article-body h3,
.article-summary h2,
.comments h2 {
  font-family: var(--font-display);
  margin-top: 1.8rem;
}

.article-body h2,
.article-summary h2 {
  font-size: 1.55rem;
}

.article-body h3 {
  font-size: 1.2rem;
}

.article-body p,
.article-summary p,
.comment p {
  color: var(--ink);
}

.article-body ul,
.article-body ol,
.article-summary ul,
.article-summary ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink);
}

.article-body li + li,
.article-summary li + li {
  margin-top: 0.35rem;
}

.article-body a {
  font-weight: 600;
}

.article-summary {
  margin-top: 2rem;
  padding: 1.25rem 1.35rem;
  background: #fff8e6;
  border-radius: 16px;
  border: 1px solid rgba(232, 176, 31, 0.45);
}

.article-summary h2 {
  margin-top: 0;
}

.article-note {
  margin-top: 1.5rem;
  font-size: 0.92rem;
}

.comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.comment-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comment {
  background: var(--paper);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.comment header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.comment header span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.comment-form {
  margin-top: 0.5rem;
}

.related {
  margin-top: 3rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

@media (max-width: 980px) {
  body.has-ads .page-frame {
    grid-template-columns: 1fr;
  }

  .ad-rail {
    position: static;
    padding-top: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .need-form,
  .detail-layout,
  .dash-grid,
  .paths,
  .grid-3,
  .grid-2,
  .blog-lead.has-cover {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 0;
  }

  .detail-side {
    position: static;
  }

  .role-choices ul {
    grid-template-columns: 1fr;
  }
}
