:root {
  --pink: #ef3d78;
  --pink-bright: #ff5c92;
  --ink: #101114;
  --muted: #676b75;
  --line: #e6e7eb;
  --paper: #ffffff;
  --wash: #f5f5f7;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; }

.site-header {
  position: relative;
  z-index: 40;
  min-height: 78px;
  padding: 13px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.site-brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--pink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.site-brand strong { display: block; font-size: 16px; line-height: 1.1; }
.site-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 8px; }
.site-header nav a {
  padding: 11px 13px;
  border-radius: 8px;
  color: #464952;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); background: var(--wash); }
.site-header nav .member-link { margin-left: 4px; padding-inline: 16px; color: #fff; background: var(--ink); }
.site-header nav .member-link:hover { color: #fff; background: var(--pink); }

.board-main { padding-top: 1px; background: #fff; }
.board-page #tfa-board-guide { font-family: inherit; }

.blog-teaser {
  width: min(1100px, calc(100% - 30px));
  margin: 0 auto 70px;
  padding: clamp(30px, 5vw, 58px);
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  color: #fff;
  background: var(--ink);
}
.blog-teaser::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -90px;
  border: 42px solid rgba(239,61,120,.9);
  border-radius: 50%;
}
.blog-teaser > * { position: relative; z-index: 1; max-width: 720px; }
.blog-teaser h2 { margin: 8px 0 14px; font-size: clamp(29px, 4vw, 48px); line-height: 1.04; letter-spacing: -.035em; }
.blog-teaser p:not(.eyebrow) { margin: 0 0 24px; color: #bec1c9; font-size: 18px; line-height: 1.65; }

.eyebrow { margin: 0; color: var(--pink); font-size: 12px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.arrow-link { display: inline-flex; align-items: center; gap: 9px; color: inherit; font-size: 14px; font-weight: 850; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.arrow-link span { color: var(--pink); font-size: 20px; transition: transform .18s ease; }
.arrow-link:hover span { transform: translateX(4px); }

.site-footer {
  min-height: 150px;
  padding: 42px clamp(18px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #fff;
  background: #0d0e11;
}
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { font-size: 18px; }
.site-footer span { margin-top: 6px; color: #91959f; font-size: 14px; }
.site-footer > div:last-child { display: flex; gap: 24px; }
.site-footer a { color: #d6d8de; font-size: 14px; font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: var(--pink); }

.blog-shell, .article-shell { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }
.blog-hero { padding: clamp(72px, 10vw, 130px) 0 clamp(48px, 7vw, 86px); border-bottom: 1px solid var(--line); }
.blog-hero h1 { max-width: 900px; margin: 14px 0 18px; font-size: clamp(50px, 9vw, 110px); line-height: .92; letter-spacing: -.065em; }
.blog-hero > p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(18px, 2.2vw, 24px); line-height: 1.55; }
.post-grid { padding: 64px 0 100px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(15,16,20,.09); }
.post-card-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #17191e; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-image img { transform: scale(1.02); }
.post-card > div { padding: 27px; }
.post-card time { color: var(--pink); font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.post-card h2 { margin: 13px 0 12px; font-size: clamp(24px, 3vw, 34px); line-height: 1.08; letter-spacing: -.035em; }
.post-card h2 a { text-decoration: none; }
.post-card p { margin: 0 0 23px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.empty-blog { grid-column: 1/-1; padding: clamp(42px, 7vw, 90px); border-radius: 18px; background: var(--wash); text-align: center; }
.empty-blog h2 { margin: 10px auto 12px; font-size: clamp(30px, 5vw, 54px); letter-spacing: -.045em; }
.empty-blog > p:not(.eyebrow) { max-width: 620px; margin: 0 auto 24px; color: var(--muted); font-size: 18px; line-height: 1.65; }

.article-shell { max-width: 920px; padding: 55px 0 110px; }
.back-link { color: var(--muted); font-size: 14px; font-weight: 750; text-decoration: none; }
.article-header { padding: 72px 0 46px; }
.article-header h1 { margin: 15px 0 24px; font-size: clamp(46px, 8vw, 84px); line-height: .98; letter-spacing: -.06em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; font-weight: 650; }
.article-deck { max-width: 780px; margin: 28px 0 0; color: #4d5058; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.52; }
.article-cover { margin: 0 0 54px; overflow: hidden; border-radius: 18px; background: #17191e; }
.article-cover img { display: block; width: 100%; height: auto; }
.article-content { max-width: 760px; margin: 0 auto; color: #25272c; font-family: ui-serif, Georgia, serif; font-size: 19px; line-height: 1.78; }
.article-content h2, .article-content h3 { color: var(--ink); font-family: Inter, ui-sans-serif, sans-serif; letter-spacing: -.035em; }
.article-content h2 { margin: 1.7em 0 .6em; font-size: 36px; line-height: 1.12; }
.article-content h3 { margin: 1.6em 0 .5em; font-size: 27px; }
.article-content p, .article-content ul, .article-content ol, .article-content blockquote { margin: 0 0 1.35em; }
.article-content a { color: #ca245d; text-underline-offset: 3px; }
.article-content blockquote { margin-inline: 0; padding: 20px 26px; border-left: 4px solid var(--pink); background: var(--wash); font-size: 21px; }
.article-content img { display: block; margin: 2em auto; border-radius: 14px; }
.article-cta { margin: 72px 0 0; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-radius: 16px; color: #fff; background: var(--ink); }
.article-cta h2 { margin: 7px 0 0; font-size: 25px; }
.article-cta a { flex: 0 0 auto; padding: 15px 18px; border-radius: 8px; color: #fff; background: var(--pink); font-size: 13px; font-weight: 850; text-decoration: none; text-transform: uppercase; }

.primary-button, .secondary-button {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.primary-button { color: #fff; background: var(--pink); }
.primary-button:hover { background: var(--pink-bright); }
.secondary-button { color: var(--ink); border-color: #d9dae0; background: #fff; }
.secondary-button:hover { border-color: #b7b9c1; }

.bridge-page { min-height: 100vh; color: #fff; background: #0d0e11; }
.bridge-shell { min-height: 100vh; padding: 36px; display: grid; align-content: center; justify-items: center; gap: 40px; background: radial-gradient(700px 420px at 50% 20%, rgba(239,61,120,.18), transparent 70%); }
.bridge-brand { color: #fff; }
.bridge-brand small { color: #969aa3; }
.bridge-card { width: min(590px, 100%); padding: clamp(32px, 6vw, 58px); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: #16181d; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.bridge-card h1 { margin: 12px 0 18px; font-size: clamp(38px, 7vw, 62px); line-height: .97; letter-spacing: -.055em; }
.bridge-card > p:not(.eyebrow) { color: #bec1c8; font-size: 17px; line-height: 1.65; }
.bridge-actions { margin-top: 30px; display: grid; gap: 11px; }
.auth-form { margin-top: 28px; display: grid; gap: 13px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 8px; color: #f1f2f5; font-size: 13px; font-weight: 800; }
.auth-form input { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; background: #0d0e11; outline: none; }
.auth-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(239,61,120,.18); }
.auth-form input::placeholder { color: #777b84; }
.auth-form .primary-button { width: 100%; }
.auth-restart { padding: 8px; border: 0; color: #bdc0c8; background: transparent; cursor: pointer; font-size: 13px; font-weight: 750; }
.auth-restart:hover { color: #fff; }
.auth-status { min-height: 22px; margin: 15px 0 0 !important; color: #ff8db2 !important; font-size: 14px !important; text-align: center; }
.bridge-note { margin: 24px 0 0; font-size: 14px !important; text-align: center; }
.bridge-note a { color: #fff; }

.not-found { min-height: 68vh; padding: 90px 24px; display: grid; align-content: center; justify-items: center; text-align: center; }
.not-found h1 { margin: 10px 0 15px; font-size: clamp(40px, 8vw, 80px); line-height: .96; letter-spacing: -.055em; }
.not-found > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.not-found > div { margin-top: 20px; display: flex; gap: 10px; }

.admin-page { min-height: 100vh; background: #f1f2f5; }
.admin-app { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.admin-sidebar { padding: 24px 18px; display: flex; flex-direction: column; gap: 32px; color: #fff; background: #111216; }
.admin-sidebar .site-brand { color: #fff; }
.admin-sidebar .site-brand small { color: #858993; }
.admin-sidebar nav { display: grid; gap: 7px; }
.admin-nav, .admin-signout { width: 100%; padding: 12px 13px; border: 0; border-radius: 8px; color: #aeb1ba; background: transparent; cursor: pointer; font-size: 14px; font-weight: 750; text-align: left; text-decoration: none; }
.admin-nav:hover, .admin-nav.is-active { color: #fff; background: #24262d; }
.admin-signout { margin-top: auto; }
.admin-main { min-width: 0; }
.admin-top { padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #dfe1e6; background: #fff; }
.admin-top h1 { margin: 4px 0 0; font-size: 27px; }
.admin-top-actions { display: flex; align-items: center; gap: 9px; }
.save-status { min-width: 80px; color: var(--muted); font-size: 13px; text-align: right; }
.editor-layout { padding: 28px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 24px; align-items: start; }
.editor-form, .preview-panel, .posts-view { border: 1px solid #dfe1e6; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(20,22,28,.04); }
.editor-form { padding: 26px; display: grid; gap: 20px; }
.editor-form label { display: grid; gap: 8px; color: #2d3036; font-size: 14px; font-weight: 750; }
.editor-form input, .editor-form textarea { width: 100%; padding: 12px 13px; border: 1px solid #d7d9df; border-radius: 8px; color: var(--ink); background: #fff; font-size: 16px; line-height: 1.5; outline: none; }
.editor-form textarea { resize: vertical; }
.editor-form input:focus, .editor-form textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(239,61,120,.12); }
.field-row, .image-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.markdown-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.markdown-toolbar button { padding: 7px 10px; border: 1px solid #d9dae0; border-radius: 6px; color: #3c3f46; background: #f8f8fa; cursor: pointer; font-size: 13px; font-weight: 750; }
.seo-panel { padding: 16px; border: 1px solid #e2e3e7; border-radius: 9px; background: #f8f8fa; }
.seo-panel summary { cursor: pointer; font-size: 14px; font-weight: 800; }
.seo-panel[open] { display: grid; gap: 16px; }
.preview-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.preview-label { position: sticky; top: 0; z-index: 2; padding: 12px 18px; border-bottom: 1px solid #e3e4e8; color: var(--muted); background: rgba(255,255,255,.96); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.preview-panel article { padding: 32px; }
.preview-panel h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.02; letter-spacing: -.045em; }
.preview-panel .preview-excerpt { color: var(--muted); font-size: 18px; line-height: 1.55; }
.preview-panel .preview-content { margin-top: 28px; color: #34373e; font-family: ui-serif, Georgia, serif; font-size: 17px; line-height: 1.72; }
.preview-panel .preview-content h2, .preview-panel .preview-content h3 { font-family: Inter, sans-serif; }
.preview-empty { color: var(--muted); }
.posts-view { margin: 28px; padding: 24px; }
.posts-list { display: grid; gap: 10px; }
.post-row { padding: 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; border: 1px solid #e2e3e7; border-radius: 9px; }
.post-row h2 { margin: 0 0 5px; font-size: 18px; }
.post-row p { margin: 0; color: var(--muted); font-size: 13px; }
.post-row-actions { display: flex; gap: 7px; }
.post-row button { padding: 8px 11px; border: 1px solid #d7d9df; border-radius: 6px; cursor: pointer; background: #fff; font-size: 13px; font-weight: 750; }
.post-row .delete-button { color: #b41d4f; }

@media (max-width: 980px) {
  .site-header { align-items: flex-start; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; }
  .post-grid { grid-template-columns: 1fr; }
  .admin-app { grid-template-columns: 1fr; }
  .admin-sidebar { flex-direction: row; align-items: center; gap: 20px; }
  .admin-sidebar nav { margin-left: auto; display: flex; }
  .admin-signout { width: auto; margin: 0; }
  .editor-layout { grid-template-columns: 1fr; }
  .preview-panel { position: relative; top: 0; max-height: none; }
}

@media (max-width: 700px) {
  .site-header { padding: 12px 14px; display: grid; gap: 10px; }
  .site-header nav { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .site-header nav a { flex: 0 0 auto; padding: 9px 10px; font-size: 13px; }
  .site-header nav .member-link { margin-left: auto; }
  .site-brand-mark { width: 42px; height: 42px; }
  .site-brand strong { font-size: 15px; }
  .site-brand small { font-size: 9px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .article-cta { align-items: flex-start; flex-direction: column; }
  .article-shell { padding-top: 34px; }
  .article-header { padding-top: 48px; }
  .article-content { font-size: 18px; }
  .admin-sidebar { align-items: flex-start; flex-wrap: wrap; }
  .admin-sidebar nav { width: 100%; margin: 0; overflow-x: auto; }
  .admin-nav { width: auto; flex: 0 0 auto; }
  .admin-top { padding: 20px; align-items: flex-start; flex-direction: column; }
  .admin-top-actions { width: 100%; flex-wrap: wrap; }
  .save-status { margin-right: auto; text-align: left; }
  .editor-layout { padding: 14px; }
  .editor-form { padding: 18px; }
  .field-row, .image-fields { grid-template-columns: 1fr; }
  .posts-view { margin: 14px; padding: 14px; }
  .post-row { grid-template-columns: 1fr; }
  .bridge-shell { padding: 20px; }
}
