/*
Theme Name: Blog Factory Lab
Text Domain: blog-factory-lab
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Description: A generic WordPress theme for factory-built verification blogs.
Author: Mogmo
*/

:root {
  --bfl-ink: #15191d;
  --bfl-muted: #59636e;
  --bfl-soft: #f4f7f8;
  --bfl-paper: #fbfcfb;
  --bfl-panel: #ffffff;
  --bfl-line: #d9e2e5;
  --bfl-green: #087b5d;
  --bfl-blue: #2563eb;
  --bfl-coral: #d75f45;
  --bfl-gold: #c99519;
  --bfl-shadow: 0 18px 48px rgba(21, 25, 29, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bfl-ink);
  background: var(--bfl-paper);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic Medium", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  line-height: 1.75;
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
  height: auto;
}

.bfl-skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--bfl-ink);
  color: #fff;
}

.bfl-skip-link:focus {
  left: 8px;
}

.bfl-container {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
}

.bfl-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(21, 25, 29, 0.08);
  background: rgba(251, 252, 251, 0.94);
  backdrop-filter: blur(16px);
}

.admin-bar .bfl-site-header {
  top: 32px;
}

.bfl-header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 2fr) minmax(170px, 0.55fr);
  gap: 18px;
  align-items: center;
}

.bfl-brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.bfl-brand-name {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.18;
}

.bfl-brand-tagline {
  color: var(--bfl-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.bfl-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bfl-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--bfl-muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.bfl-menu a:hover,
.bfl-menu .current-menu-item > a,
.bfl-menu .current_page_item > a {
  color: var(--bfl-ink);
  background: #eaf1ef;
}

.bfl-search {
  display: flex;
  justify-content: flex-end;
}

.bfl-search input {
  width: min(100%, 220px);
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bfl-ink);
  font: inherit;
}

.bfl-main {
  min-height: 60vh;
}

.bfl-hero {
  padding: 54px 0 34px;
  background:
    linear-gradient(180deg, rgba(8, 123, 93, 0.08), rgba(37, 99, 235, 0.04) 60%, rgba(251, 252, 251, 0));
}

.bfl-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: center;
}

.bfl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--bfl-green);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bfl-kicker::before {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--bfl-coral);
  content: "";
}

.bfl-hero-title {
  margin: 0;
  max-width: 780px;
  font-size: 3.75rem;
  line-height: 1.08;
  font-weight: 950;
}

.bfl-hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--bfl-muted);
  font-size: 1.02rem;
}

.bfl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.bfl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bfl-ink);
  font-weight: 900;
  text-decoration: none;
}

.bfl-button[data-variant="solid"] {
  border-color: var(--bfl-ink);
  background: var(--bfl-ink);
  color: #fff;
}

.bfl-lab-panel {
  overflow: hidden;
  border: 1px solid rgba(21, 25, 29, 0.12);
  border-radius: 8px;
  background: #11171d;
  color: #f6fafb;
  box-shadow: var(--bfl-shadow);
}

.bfl-lab-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.bfl-lab-rows {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.bfl-lab-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  background: #11171d;
  font-size: 0.82rem;
}

.bfl-lab-row span:first-child {
  color: #76e0bf;
  font-weight: 900;
}

.bfl-lab-row strong {
  overflow-wrap: anywhere;
}

.bfl-lab-row em {
  color: #f4c261;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.bfl-spotlight-panel {
  padding: 24px;
  border: 1px solid rgba(21, 25, 29, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 248, 0.94)),
    var(--bfl-panel);
  box-shadow: var(--bfl-shadow);
}

.bfl-spotlight-kicker {
  color: var(--bfl-coral);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bfl-spotlight-panel h2 {
  margin: 8px 0 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.bfl-spotlight-panel p {
  margin: 10px 0 0;
  color: var(--bfl-muted);
  font-size: 0.94rem;
}

.bfl-spotlight-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.bfl-spotlight-links a {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.bfl-spotlight-links a:hover {
  border-color: rgba(8, 123, 93, 0.45);
  background: #f7fbf9;
}

.bfl-spotlight-links span,
.bfl-info-tile span {
  color: var(--bfl-green);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bfl-spotlight-links strong {
  align-self: end;
  font-size: 1rem;
  line-height: 1.35;
}

.bfl-section {
  padding: 42px 0;
}

.bfl-section[data-tone="soft"] {
  background: var(--bfl-soft);
}

.bfl-section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.bfl-section-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

.bfl-section-copy {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--bfl-muted);
}

.bfl-text-link {
  color: var(--bfl-green);
  font-weight: 900;
  white-space: nowrap;
}

.bfl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bfl-card,
.bfl-category-card,
.bfl-empty,
.bfl-policy-box {
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: var(--bfl-panel);
}

.bfl-card {
  overflow: hidden;
  min-height: 100%;
}

.bfl-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(8, 123, 93, 0.18), rgba(37, 99, 235, 0.16)),
    #e7eef0;
}

.bfl-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bfl-card-body {
  padding: 16px;
}

.bfl-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--bfl-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.bfl-card-cat {
  color: var(--bfl-coral);
}

.bfl-card-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.42;
}

.bfl-card-title a {
  text-decoration: none;
}

.bfl-card-title a:hover {
  text-decoration: underline;
}

.bfl-card-excerpt {
  margin: 10px 0 0;
  color: var(--bfl-muted);
  font-size: 0.92rem;
}

.bfl-category-card {
  min-height: 178px;
  padding: 18px;
}

.bfl-category-card:nth-child(3n + 1) {
  border-top: 4px solid var(--bfl-green);
}

.bfl-category-card:nth-child(3n + 2) {
  border-top: 4px solid var(--bfl-blue);
}

.bfl-category-card:nth-child(3n) {
  border-top: 4px solid var(--bfl-coral);
}

.bfl-category-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.bfl-category-title a {
  text-decoration: none;
}

.bfl-category-description {
  margin: 10px 0 0;
  color: var(--bfl-muted);
  font-size: 0.92rem;
}

.bfl-category-count {
  margin-top: 14px;
  color: var(--bfl-gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.bfl-policy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-left: 5px solid var(--bfl-green);
}

.bfl-policy-box h2 {
  margin: 0;
  font-size: 1.32rem;
}

.bfl-policy-box p {
  margin: 8px 0 0;
  color: var(--bfl-muted);
}

.bfl-empty {
  padding: 22px;
  color: var(--bfl-muted);
}

.bfl-empty-action {
  display: grid;
  gap: 8px;
}

.bfl-empty-action strong {
  color: var(--bfl-ink);
  font-size: 1.06rem;
}

.bfl-empty-action p {
  margin: 0;
}

.bfl-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(220px, 300px);
  gap: 42px;
  align-items: start;
  padding: 42px 0 58px;
}

.bfl-page-wrap {
  width: min(920px, calc(100vw - 40px));
  padding: 54px 0 68px;
}

.bfl-article,
.bfl-page {
  min-width: 0;
}

.bfl-entry-header {
  margin-bottom: 24px;
}

.bfl-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--bfl-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.bfl-entry-title {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.16;
}

.bfl-entry-content {
  font-size: 1rem;
}

.bfl-page .bfl-entry-content {
  max-width: 760px;
  color: #22282d;
  font-size: 1.04rem;
}

.bfl-entry-content h2,
.bfl-entry-content h3 {
  margin-top: 2.1em;
  line-height: 1.35;
}

.bfl-entry-content table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.bfl-entry-content th,
.bfl-entry-content td {
  padding: 10px;
  border: 1px solid var(--bfl-line);
  text-align: left;
  vertical-align: top;
}

.bfl-entry-content pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 8px;
  background: #11171d;
  color: #f6fafb;
}

.bfl-page-section {
  margin-top: 34px;
}

.bfl-tile-grid,
.bfl-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bfl-score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bfl-info-tile {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 164px;
  padding: 18px;
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

a.bfl-info-tile:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 14px 34px rgba(21, 25, 29, 0.08);
}

.bfl-info-tile strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.bfl-info-tile em {
  color: var(--bfl-muted);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.7;
}

.bfl-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
}

.bfl-side-box {
  padding: 16px;
  border: 1px solid var(--bfl-line);
  border-radius: 8px;
  background: #fff;
}

.bfl-side-box h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.bfl-side-box ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1em;
}

.bfl-pagination {
  margin-top: 28px;
}

.bfl-site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--bfl-line);
  background: #11171d;
  color: rgba(255, 255, 255, 0.82);
}

.bfl-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.bfl-footer-inner a {
  color: #fff;
}

@media (max-width: 920px) {
  .bfl-header-inner,
  .bfl-hero-grid,
  .bfl-content-wrap,
  .bfl-policy-box {
    grid-template-columns: 1fr;
  }

  .bfl-search {
    justify-content: flex-start;
  }

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

  .bfl-tile-grid,
  .bfl-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bfl-sidebar {
    position: static;
  }

  .bfl-hero-title {
    font-size: 2.7rem;
  }

  .bfl-entry-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .admin-bar .bfl-site-header {
    top: 0;
  }

  .bfl-site-header {
    position: static;
  }

  .bfl-container {
    width: min(100% - 28px, 1120px);
  }

  .bfl-page-wrap {
    width: min(100% - 28px, 920px);
    padding: 38px 0 52px;
  }

  .bfl-header-inner {
    min-height: 0;
    padding: 14px 0;
  }

  .bfl-primary-nav {
    overflow-x: auto;
    margin-inline: -14px;
    padding-inline: 14px;
    scrollbar-width: none;
  }

  .bfl-primary-nav::-webkit-scrollbar {
    display: none;
  }

  .bfl-primary-nav .bfl-menu {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .bfl-primary-nav .bfl-menu a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .bfl-site-footer .bfl-menu {
    justify-content: flex-start;
  }

  .bfl-site-footer .bfl-menu a {
    color: #fff;
    background: transparent;
    white-space: normal;
  }

  .bfl-search input {
    width: 100%;
  }

  .bfl-hero {
    padding-top: 34px;
  }

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

  .bfl-tile-grid,
  .bfl-score-grid,
  .bfl-spotlight-links {
    grid-template-columns: 1fr;
  }

  .bfl-section-head,
  .bfl-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .bfl-lab-row {
    grid-template-columns: 78px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 12px;
  }

  .bfl-hero-title {
    font-size: 2.05rem;
  }

  .bfl-entry-title {
    font-size: 1.85rem;
  }
}
