/*
Theme Name: bobnoblog Original
Theme URI: https://bobnoblog.com/
Author: bobnoblog
Author URI: https://bobnoblog.com/
Description: Bobnoblog editorial redesign: accessible navigation, curated posts, readable archives and articles, companion-managed advertising and TOC.
Version: 2.4.14
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: bobnoblog-preview
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Copyright: Copyright (C) 2026 bobnoblog.
*/

:root {
  color-scheme: dark;
  --bg: #071421;
  --header: #0a1928;
  --surface: #10263b;
  --surface-raised: #16344e;
  --line: #28445c;
  --text: #f3f7fd;
  --muted: #b6c9d9;
  --accent: #58a6ff;
  --radius: 16px;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3, p { overflow-wrap: break-word; }
.wrap { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 1000;
  inset: 10px auto auto 10px;
  padding: 10px 16px;
  transform: translateY(-180%);
  background: #fff;
  color: #0a1928;
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

/* Global header and navigation */
.site-header { position: relative; z-index: 20; background: var(--header); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand {
  flex: none;
  font-size: clamp(23px, 2.3vw, 28px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.menu-list { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 26px; }
.menu-list li { margin: 0; padding: 0; list-style: none; }
.menu-list a { display: inline-block; padding-block: 8px; font-size: 13px; font-weight: 700; color: #dbe8f4; transition: color .2s ease; }
.menu-list a:hover, .menu-list .current-menu-item > a { color: var(--accent); }
.mobile-navigation { display: none; }

/* Homepage hero */
.homepage { padding-top: 38px; }
.hero {
  min-height: 458px;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 38%, rgba(72, 139, 204, .34), transparent 38%),
    linear-gradient(116deg, #0a1d2e 7%, #112f4a 63%, #1d4261 100%);
  border: 1px solid #274861;
  border-radius: 21px;
  padding: 64px clamp(26px, 7%, 84px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .08;
  background-image:
    linear-gradient(90deg, #b9dfff 1px, transparent 1px),
    linear-gradient(#b9dfff 1px, transparent 1px);
  background-size: 47px 47px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
}
.hero-copy { width: min(100%, 740px); position: relative; z-index: 1; }
.eyebrow, .section-label, .card-tag {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .11em;
}
.eyebrow { margin: 0 0 20px; }
.hero h1 { margin: 0 0 23px; font-size: clamp(33px, 4.25vw, 55px); line-height: 1.46; font-weight: 700; letter-spacing: -.04em; }
.hero-description { max-width: 625px; margin: 0; color: #c8d9e9; font-size: 15px; line-height: 2.05; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 47px; padding: 10px 21px; border-radius: 100px; font-size: 13px; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: #298fee; color: #fff; }
.button-primary:hover { background: #147edc; }
.button-secondary { border: 1px solid #7496b3; background: rgba(3, 17, 31, .15); color: #fff; }
.button-secondary:hover { background: rgba(255, 255, 255, .09); }
.hero-decoration { position: absolute; z-index: 0; pointer-events: none; inset: 0 0 0 auto; width: 36%; overflow: hidden; opacity: .73; }
.orb { display: block; position: absolute; border-radius: 50%; border: 1px solid rgba(174, 217, 253, .21); }
.orb-one { width: 345px; height: 345px; right: -72px; top: 45px; }
.orb-two { width: 240px; height: 240px; right: -20px; top: 97px; }
.orb-three { width: 120px; height: 120px; right: 42px; top: 157px; background: radial-gradient(circle at 35% 25%, rgba(139, 209, 255, .19), rgba(64, 139, 192, .025) 65%); }

/* Shared section typography */
.home-section { margin-top: 69px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 23px; }
.section-label { margin: 0 0 11px; text-transform: uppercase; }
.section-heading h2, .about-panel h2 { font-size: clamp(25px, 2.6vw, 32px); font-weight: 700; letter-spacing: -.035em; line-height: 1.5; margin: 0 0 9px; }
.section-description { font-size: 13px; line-height: 1.9; color: var(--muted); margin: 0; }
.section-link { flex: none; font-size: 12px; color: #b9dbff; padding: 8px 0; font-weight: 700; white-space: nowrap; }
.section-link:hover { color: #fff; }
.section-link span { margin-left: 5px; }

/* Study area */
.study-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 16px; }
.study-feature, .study-link, .gadget-card, .latest-card { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.study-feature {
  isolation: isolate;
  min-height: 331px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 27px 32px 32px;
  background: linear-gradient(132deg, #1b4263 0%, #163651 35%, #0e253b 100%);
  transition: border-color .2s ease, transform .2s ease;
}
.study-feature::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; border: 1px solid rgba(166, 210, 244, .18); border-radius: 50%; right: -105px; top: -150px; box-shadow: 0 0 0 45px rgba(150, 194, 236, .035), 0 0 0 90px rgba(150, 194, 236, .02); }
a.study-feature:hover, a.study-link:hover, a.gadget-card:hover, .latest-card:hover { transform: translateY(-3px); border-color: #547b9e; }
.feature-index { font-size: 11px; font-weight: 700; letter-spacing: .13em; color: #9bcaff; }
.feature-bottom { display: flex; flex-direction: column; align-items: flex-start; }
.feature-label { display: inline-block; padding: 4px 11px; background: #265477; border: 1px solid #3b698d; border-radius: 100px; font-size: 11px; color: #d1e8ff; }
.feature-title { margin: 10px 0 11px; font-size: clamp(25px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.04em; line-height: 1.46; }
.feature-text { max-width: 390px; color: #c4d6e8; font-size: 12px; line-height: 1.85; }
.inline-arrow { padding-left: 9px; color: var(--accent); font-size: 16px; }
.study-links { display: grid; gap: 14px; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.study-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 24px; background: var(--surface); transition: border-color .2s ease, transform .2s ease; }
.study-link-copy { display: flex; flex-direction: column; gap: 5px; }
.study-link-title { font-size: 17px; font-weight: 700; line-height: 1.6; }
.study-link-text { font-size: 12px; color: var(--muted); }
.arrow-circle { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #1d3b56; color: #bcdfff; font-size: 16px; }

/* Gadget cards; optional images are selected in the Customizer */
.gadget-grid, .latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.gadget-card { background: var(--surface); transition: border-color .2s ease, transform .2s ease; }
.gadget-card__visual { overflow: hidden; aspect-ratio: 1.65; background: #183853; }
.gadget-card__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gadget-card:hover .gadget-card__image { transform: none; }
.gadget-card__placeholder { position: relative; height: 100%; overflow: hidden; background: radial-gradient(circle at 70% 20%, #2a597c, #173b5a 51%, #10263e); }
.gadget-card__placeholder--phone { background: radial-gradient(circle at 65% 20%, #295a72, #163d55 52%, #102539); }
.gadget-card__placeholder--desk { background: radial-gradient(circle at 65% 20%, #375b79, #1b344f 52%, #111f35); }
.placeholder-ring { position: absolute; width: 154px; height: 154px; border-radius: 50%; border: 1px solid rgba(185, 228, 255, .46); left: calc(50% - 77px); top: calc(50% - 77px); box-shadow: inset 0 0 0 32px rgba(170, 220, 255, .035), 0 0 0 27px rgba(170, 220, 255, .035), 0 0 0 52px rgba(170, 220, 255, .026); }
.placeholder-line { position: absolute; width: 72%; height: 1px; background: linear-gradient(90deg, transparent, rgba(185, 228, 255, .55), transparent); transform: rotate(-23deg); left: 14%; top: 50%; }
.gadget-card__placeholder--phone .placeholder-ring { width: 83px; height: 135px; border-radius: 16px; left: calc(50% - 42px); top: calc(50% - 67px); box-shadow: 0 0 0 28px rgba(170, 220, 255, .025); }
.gadget-card__placeholder--phone .placeholder-line { width: 22px; height: 3px; border-radius: 5px; left: calc(50% - 11px); top: 26%; transform: none; background: rgba(185, 228, 255, .48); }
.gadget-card__placeholder--desk .placeholder-ring { width: 170px; height: 103px; left: calc(50% - 85px); top: calc(50% - 65px); border-radius: 7px; box-shadow: 0 0 0 25px rgba(170, 220, 255, .028); }
.gadget-card__placeholder--desk .placeholder-line { width: 99px; height: 12px; left: calc(50% - 49px); top: calc(50% + 49px); transform: none; border-bottom: 1px solid rgba(185, 228, 255, .5); }
.gadget-card__body { display: flex; flex-direction: column; align-items: flex-start; position: relative; min-height: 163px; padding: 22px 24px 25px; }
.card-tag { margin-bottom: 7px; font-size: 10px; }
.gadget-card__title { font-size: 17px; line-height: 1.5; font-weight: 700; padding-right: 14px; }
.gadget-card__description { font-size: 12px; margin-top: 7px; color: var(--muted); }
.gadget-card__arrow { position: absolute; top: 21px; right: 22px; color: var(--accent); font-size: 20px; }

/* Recent posts */
.latest-card { background: var(--surface); transition: border-color .2s ease, transform .2s ease; }
.latest-card__link { display: block; height: 100%; }
.latest-card__visual { aspect-ratio: 1.7; overflow: hidden; background: #1d4566; }
.latest-card__visual img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.latest-card:hover .latest-card__visual img { transform: none; }
.latest-card__noimage { display: block; height: 100%; background: linear-gradient(140deg, #254e6f, #112b43); }
.latest-card__content { padding: 19px 22px 22px; }
.latest-card__content h3 { font-size: 15px; line-height: 1.65; font-weight: 700; margin: 6px 0 18px; min-height: 3.3em; }
.latest-card__content time { color: #b2c5d6; font-size: 11px; }
.empty-notice { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

/* About */
.home-about { margin-bottom: 80px; }
.about-panel { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 35px; padding: 38px 44px; background: linear-gradient(105deg, #122b41, #102236); border: 1px solid var(--line); border-radius: var(--radius); }
.about-panel h2 { margin-bottom: 0; }
.about-panel > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 2.05; }

/* Footer */
.site-footer { padding: 27px 0 34px; border-top: 1px solid var(--line); background: #081624; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; color: #b1c2d2; font-size: 12px; }
.footer-navigation { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.footer-navigation .menu-list { gap: 17px; flex-wrap: wrap; }
.footer-navigation .menu-list a, .privacy-link { font-size: 12px; font-weight: 400; color: #b1c2d2; }
.footer-navigation a:hover { color: var(--accent); }

/* Simple, deliberately temporary non-home templates */
.inner-page { padding-block: 48px 90px; }
.article-surface { color-scheme: light; max-width: 880px; margin-inline: auto; background: #fff; color: #1c2937; padding: clamp(23px, 5vw, 56px); border-radius: var(--radius); overflow: hidden; }
.article-surface a { color: #0866b0; text-decoration: underline; text-underline-offset: 3px; }
.article-surface h1 { font-size: clamp(25px, 3vw, 36px); line-height: 1.5; margin: 0 0 24px; }
.article-surface h2 { font-size: clamp(21px, 2.5vw, 27px); line-height: 1.5; }
.article-surface h3 { font-size: 19px; }
.article-surface p, .article-surface li { line-height: 2; }
.article-surface time { color: #687789; font-size: 12px; }
.article-surface .entry-content { overflow-wrap: anywhere; }
.article-surface .entry-content img { max-width: 100%; height: auto; }
.article-surface .entry-content iframe { max-width: 100%; }
.article-surface .wp-block-table, .article-surface .wp-block-image { max-width: 100%; overflow-x: auto; }
.archive-list .archive-item { border-top: 1px solid #dfe6ee; padding: 18px 0; }
.archive-list .archive-item h2 { font-size: 19px; margin: 0 0 8px; }
.archive-list .archive-item p { margin: 0 0 6px; font-size: 14px; color: #435161; }
.pagination { margin-top: 28px; }
.pagination .page-numbers { display: inline-block; margin-right: 12px; }
.article-surface input[type="search"] { max-width: 100%; border: 1px solid #869cb1; border-radius: 5px; padding: 8px 10px; }
.article-surface input[type="submit"] { padding: 8px 13px; border: 0; border-radius: 5px; background: #0866b0; color: #fff; cursor: pointer; }
.article-surface pre, .article-surface code { max-width: 100%; overflow-x: auto; }
.article-surface pre { padding: 15px; background: #edf3f7; }
.article-surface table { max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.article-surface th, .article-surface td { border: 1px solid #d5dfe8; padding: 8px 11px; }
.article-surface .alignwide { max-width: 100%; }
.article-surface .alignfull { max-width: 100%; }

@media (max-width: 1000px) {
  .menu-list { gap: 16px; }
  .menu-list a { font-size: 12px; }
  .hero-decoration { opacity: .35; }
  .study-link { padding: 18px 20px; }
  .gadget-card__body { padding: 19px; }
}

@media (max-width: 780px) {
  .wrap { width: min(100% - 34px, var(--container)); }
  .header-inner { min-height: 68px; }
  .desktop-navigation { display: none; }
  .mobile-navigation { display: block; position: relative; }
  .mobile-navigation summary { display: flex; align-items: center; gap: 9px; padding: 9px 1px 9px 12px; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
  .mobile-navigation summary::-webkit-details-marker { display: none; }
  .menu-symbol { display: flex; flex-direction: column; justify-content: space-between; width: 20px; height: 14px; }
  .menu-symbol span { width: 100%; height: 2px; border-radius: 2px; background: #e6f0f9; }
  .mobile-navigation nav { position: absolute; z-index: 30; top: calc(100% + 9px); right: 0; width: min(300px, calc(100vw - 35px)); padding: 12px; background: #10283d; border: 1px solid #41617d; border-radius: 12px; box-shadow: 0 16px 35px rgba(0, 0, 0, .3); }
  .mobile-navigation .menu-list { flex-direction: column; align-items: stretch; gap: 0; }
  .mobile-navigation .menu-list a { display: block; padding: 12px 14px; font-size: 13px; }
  .homepage { padding-top: 22px; }
  .hero { min-height: 0; padding: 52px 33px; }
  .hero-decoration { width: 65%; opacity: .24; }
  .home-section { margin-top: 56px; }
  .study-grid { grid-template-columns: minmax(0, 1.16fr) minmax(0, .94fr); gap: 12px; }
  .study-feature { min-height: 258px; }
  .study-links { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .gadget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: start; }
  .about-panel { grid-template-columns: 1fr; gap: 14px; padding: 28px; }
}

@media (max-width: 540px) {
  .wrap { width: min(100% - 28px, var(--container)); }
  .brand { font-size: 25px; }
  .hero { padding: 41px 23px 43px; border-radius: 15px; }
  .hero h1 { font-size: clamp(29px, 8vw, 37px); line-height: 1.5; letter-spacing: -.045em; }
  .hero-description { font-size: 13px; }
  .hero-actions { align-items: stretch; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .button { justify-content: center; min-height: 40px; padding: 9px 12px; font-size: 11px; }
  .hero-decoration { opacity: .13; }
  .section-heading { flex-direction: column; gap: 4px; margin-bottom: 17px; }
  .section-heading h2 { font-size: 26px; }
  .section-link { padding-top: 8px; }
  .study-feature { padding: 17px 15px; min-height: 203px; }
  .feature-title { font-size: clamp(16px, 4.6vw, 21px); }
  .study-link { padding: 10px 11px; gap: 4px; }
  .study-link-title { font-size: clamp(10px, 2.9vw, 12px); line-height: 1.45; }
  .study-link-text { display: none; }
  .arrow-circle { width: 21px; height: 21px; font-size: 12px; }
  .gadget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gadget-card__visual { aspect-ratio: 1.22; }
  .gadget-card__body { min-height: 95px; padding: 10px 9px 13px; }
  .gadget-card__title { font-size: clamp(10px, 2.9vw, 12px); padding-right: 0; line-height: 1.5; }
  .gadget-card__description { font-size: 10px; line-height: 1.5; margin-top: 6px; }
  .gadget-card__arrow { display: none; }
  .gadget-card .card-tag { font-size: 9px; margin-bottom: 5px; letter-spacing: .01em; }
  .latest-card__content h3 { min-height: 0; }
  .home-about { margin-bottom: 52px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-navigation { gap: 12px; }
  .footer-navigation .menu-list { gap: 11px; }
  .inner-page { padding-block: 25px 50px; }
  .article-surface { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------
   WordPress Pages: visually consistent with the dark homepage,
   with a paper surface for long-form, readable page content.
   No WordPress Page content is replaced by these styles.
------------------------------------------------------------ */
.content-page { padding-top: 38px; padding-bottom: clamp(55px, 8vw, 110px); }
.content-page__article { width: 100%; }
.content-page__header {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid #28485f; border-radius: 18px 18px 0 0;
  min-height: 205px;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(30px, 5vw, 62px) clamp(23px, 6.5vw, 74px);
  background: radial-gradient(circle at 88% 13%, rgba(79, 146, 201, .24), transparent 45%), linear-gradient(116deg, #0c2439, #193d5b);
}
.content-page__header::after {
  content: ""; position: absolute; pointer-events: none; right: -84px; top: -95px;
  width: 340px; height: 340px; border: 1px solid rgba(191, 226, 255, .12);
  border-radius: 50%; box-shadow: 0 0 0 57px rgba(184, 218, 255, .035), 0 0 0 115px rgba(184, 218, 255, .018);
  z-index: -1;
}
.content-page__breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; font-size: 12px; color: #bfd0df; margin-bottom: 18px; }
.content-page__breadcrumb a { color: #d3e7f9; }
.content-page__breadcrumb a:hover { color: var(--accent); }
.content-page__breadcrumb span[aria-current="page"] { max-width: min(80vw, 750px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.content-page__title { margin: 0; max-width: 900px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.45; letter-spacing: -.04em; }
.content-page__accent { height: 3px; width: 47px; background: var(--accent); border-radius: 9px; margin-top: 22px; }
.content-page__paper {
  max-width: none; background: #fbfdff; color: #233347; color-scheme: light;
  padding: clamp(25px, 5.8vw, 73px); border: 1px solid #d3e0ea; border-top: 0;
  border-radius: 0 0 18px 18px; min-height: 260px;
}
.content-page__body { max-width: 930px; margin-inline: auto; font-size: 15px; line-height: 2.05; overflow-wrap: anywhere; }
.content-page__body > :first-child { margin-top: 0; }
.content-page__body > :last-child { margin-bottom: 0; }
.content-page__body p, .content-page__body ul, .content-page__body ol { margin-block: 0 1.55em; }
.content-page__body li + li { margin-top: .3em; }
.content-page__body ul, .content-page__body ol { padding-left: 1.65em; }
.content-page__body h2 {
  margin: 2.1em 0 .9em; padding: 0 0 .52em; border-bottom: 1px solid #d8e3ec;
  font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.03em; line-height: 1.5;
}
.content-page__body h3 { margin: 1.75em 0 .7em; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; }
.content-page__body h4 { margin: 1.5em 0 .6em; font-size: 17px; line-height: 1.6; }
.content-page__body a { color: #075e9c; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.content-page__body a:hover { color: #08446e; }
.content-page__body img { height: auto; max-width: 100%; }
.content-page__body figure { margin-inline: 0; max-width: 100%; }
.content-page__body figcaption { margin-top: 8px; color: #627487; font-size: 12px; text-align: center; }
.content-page__body blockquote { margin: 26px 0; padding: 5px 22px; border-left: 4px solid #58a6ff; background: #edf5fc; }
.content-page__body blockquote p:last-child { margin-bottom: 0; }
.content-page__body hr { border: 0; border-top: 1px solid #d8e3ec; margin: 35px 0; }
.content-page__body code { padding: 2px 5px; border-radius: 4px; background: #eaf1f8; font-size: .91em; }
.content-page__body pre { width: 100%; max-width: 100%; overflow-x: auto; padding: 22px; border-radius: 10px; background: #10263b; color: #e9f3ff; line-height: 1.75; }
.content-page__body pre code { background: transparent; color: inherit; padding: 0; }
.content-page__body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.content-page__body th, .content-page__body td { border: 1px solid #cfdae4; padding: 10px 12px; text-align: left; }
.content-page__body th { background: #edf4fa; }
.content-page__body .wp-block-table { max-width: 100%; overflow-x: auto; }
.content-page__body .wp-block-table table { width: 100%; }
.content-page__body .wp-block-button__link {
  display: inline-block; padding: 11px 23px; border-radius: 100px;
  background: #1168a9; color: #fff; text-decoration: none; font-weight: 700; line-height: 1.5;
}
.content-page__body .wp-block-button__link:hover { background: #084f85; color: #fff; }
.content-page__body .wp-block-columns { gap: 28px; }
.content-page__body .wp-block-group { max-width: 100%; }
.content-page__body iframe, .content-page__body video, .content-page__body embed { max-width: 100%; }
.content-page__body input:not([type="checkbox"]):not([type="radio"]),
.content-page__body textarea, .content-page__body select { max-width: 100%; padding: 9px 12px; border: 1px solid #a9bdce; border-radius: 6px; color: #172b3b; background: #fff; }
.content-page__body input[type="submit"], .content-page__body button { cursor: pointer; }
.content-page__body .alignleft { float: left; margin: 0 24px 15px 0; }
.content-page__body .alignright { float: right; margin: 0 0 15px 24px; }
.content-page__body .aligncenter { margin-inline: auto; }
.content-page__body::after { content: ""; display: table; clear: both; }
.content-page__paper .page-links { margin-top: 25px; font-size: 13px; }
@media (max-width: 700px) {
  .content-page { padding-top: 22px; }
  .content-page__header { min-height: 165px; border-radius: 13px 13px 0 0; }
  .content-page__paper { border-radius: 0 0 13px 13px; }
  .content-page__body { font-size: 14px; }
  .content-page__body table { font-size: 12px; }
  .content-page__body th, .content-page__body td { padding: 8px 9px; }
  .content-page__body .wp-block-columns { gap: 15px; }
  .content-page__body .alignleft, .content-page__body .alignright { float: none; margin: 0 0 20px; }
}
/* Prevent empty editor-controlled homepage decoration from creating blank rows. */
.homepage--empty .home-section { margin-top: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Homes with one configured feature/card: do not reserve an empty column. */
.study-grid--single { grid-template-columns: minmax(0, 1fr); }
.study-grid--single .study-feature { min-height: 290px; }
.study-grid--single .study-links { grid-template-rows: auto; }
.study-links--count-1 { grid-template-rows: 1fr; }
.study-links--count-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.gadget-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
/* Static pages should not inherit the dark code-surface text unintentionally. */
.content-page__body .wp-block-code code { background: none; }


/* Homepage v0.5: follows the hand-drawn wireframe. */
.hero--wireframe { gap: clamp(22px, 4vw, 58px); }
.hero--wireframe.hero--with-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  align-items: center;
  min-height: 440px;
  padding-block: clamp(35px, 5.5vw, 65px);
}
.hero--with-tools .hero-copy { width: 100%; }
.hero-tools { position: relative; z-index: 1; min-width: 0; padding: 20px; border: 1px solid rgba(168,211,246,.24); background: rgba(6,23,40,.5); border-radius: 17px; backdrop-filter: blur(8px); }
.hero-tools__heading { margin: 0 0 14px; font-weight: 700; font-size: clamp(16px, 2vw, 20px); letter-spacing: -.03em; }
.hero-tools__list { display: grid; gap: 11px; }
.hero-tool-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 86px; border: 1px solid rgba(145,195,232,.2); border-radius: 12px; padding: 16px 19px; background: rgba(25,57,82,.84); }
.hero-tool-card[href]:hover { background: rgba(43,84,116,.88); border-color: rgba(173,219,253,.5); }
.hero-tool-card__copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hero-tool-card__copy strong { font-weight: 700; font-size: 15px; line-height: 1.55; }
.hero-tool-card__copy small { font-size: 11px; color: #cad9e8; line-height: 1.75; }
.hero-tool-card__arrow { flex: none; color: #a4d1fa; font-size: 18px; }
/* Latest posts and author in a single lower row as sketched. */
.home-lower { display: block; margin-top: 73px; margin-bottom: 85px; }
.home-lower--split { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .8fr); gap: 23px; align-items: start; }
.home-lower > .home-section { margin-top: 0; }
.home-lower--split .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.home-lower--split .latest-card__content { padding: 16px 17px 19px; }
.home-lower--split .latest-card__content h3 { font-size: 14px; }
.home-lower .home-about { margin: 0; }
.home-lower .about-panel { display: block; padding: 26px 25px 30px; background: linear-gradient(150deg, #15354f 0%, #10263c 80%); }
.about-panel__image { width: 100%; max-height: 235px; overflow: hidden; border-radius: 11px; margin-bottom: 23px; background: #1b405d; }
.about-panel__image img { width: 100%; height: 100%; max-height: 235px; object-fit: cover; }
.home-lower .about-panel h2 { margin: 4px 0 16px; font-size: clamp(20px, 2vw, 25px); }
.home-lower .about-panel .section-label { margin-bottom: 9px; }
.about-panel__description { color: var(--muted); font-size: 13px; line-height: 2; margin: 0 0 18px; }
.about-panel__link { display: inline-flex; align-items: center; gap: 8px; color: #abd7ff; font-weight: 700; font-size: 12px; border-bottom: 1px solid rgba(171,215,255,.38); padding-bottom: 3px; }
a.about-panel__link:hover { color: #fff; }
/* Keep a consistent Japanese editorial rhythm, without ornamental labels. */
.hero--wireframe h1 { text-wrap: balance; }
.home-section { scroll-margin-top: 38px; }
@media (max-width: 900px) {
  .hero--wireframe.hero--with-tools { grid-template-columns: minmax(0, 1fr) minmax(235px, .8fr); padding: 36px; gap: 24px; }
  .home-lower--split { grid-template-columns: minmax(0, 1fr) 250px; gap: 17px; }
  .home-lower--split .latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-lower .about-panel { padding: 22px; }
}
@media (max-width: 780px) {
  .hero--wireframe.hero--with-tools { grid-template-columns: 1fr; padding: 35px 29px; gap: 28px; }
  .hero-tools { padding: 17px; }
  .home-lower--split { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 14px; }
  .home-lower .about-panel { padding: 18px; }
  .home-lower .about-panel__image { max-width: 100%; }
}
@media (max-width: 540px) {
  .hero--wireframe.hero--with-tools { padding: 31px 22px; gap: 22px; }
  .hero--wireframe .hero-actions { margin-top: 25px; }
  .home-lower { margin-top: 55px; margin-bottom: 60px; }
  .home-lower--split .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-tools { border-radius: 13px; }
  .hero-tool-card { padding: 15px; min-height: 74px; }
}

/* v0.6.0: preserve the original navy palette and reproduce the user's
   three-column mobile composition instead of stacking all homepage cards. */
@media (max-width: 540px) {
  .wrap { width: min(100% - 28px, var(--container)); }
  .homepage { padding-top: 17px; }
  .hero { border-radius: 16px; }
  .hero--wireframe.hero--with-tools { min-height: 0; padding: 25px 19px; gap: 18px; }
  .hero--wireframe h1 { font-size: clamp(22px, 6.2vw, 29px); line-height: 1.48; margin-bottom: 13px; }
  .hero .eyebrow { margin-bottom: 9px; font-size: 10px; }
  .hero-description { font-size: 11.5px; line-height: 1.75; }
  .hero--wireframe .hero-actions { margin-top: 17px; }
  .hero-actions .button { flex: 0 1 auto; font-size: 10px; min-height: 36px; padding: 8px 10px; line-height: 1.3; }
  .hero-tools { padding: 12px; background: rgba(6,23,40,.35); }
  .hero-tools__heading { font-size: 12px; margin-bottom: 9px; }
  .hero-tools__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-tool-card { padding: 9px; min-height: 58px; gap: 4px; }
  .hero-tool-card__copy strong { font-size: 10px; line-height: 1.4; }
  .hero-tool-card__copy small { display: none; }
  .hero-tool-card__arrow { font-size: 12px; }
  .home-section { margin-top: 37px; }
  .section-heading { margin-bottom: 12px; }
  .section-heading h2 { font-size: clamp(17px, 4.8vw, 22px); margin-bottom: 5px; line-height: 1.45; }
  .section-label { font-size: 9px; margin-bottom: 6px; }
  .section-description { font-size: 10px; line-height: 1.6; }
  .section-link { font-size: 10px; }
  .study-grid { grid-template-columns: minmax(0, 1.16fr) minmax(0, .94fr); gap: 9px; align-items: stretch; }
  .study-grid.study-grid--single { grid-template-columns: minmax(0, 1fr); }
  .study-feature { min-height: 196px; border-radius: 13px; }
  .study-feature .feature-label { padding: 2px 7px; font-size: 9px; }
  .feature-title { margin: 7px 0 5px; }
  .feature-text { font-size: 10px; line-height: 1.5; }
  .feature-index { font-size: 9px; }
  .study-links { grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .study-link { border-radius: 12px; }
  .study-link-copy { gap: 0; }
  .study-link .arrow-circle { margin-left: auto; }
  .gadget-card { border-radius: 12px; }
  .gadget-card__visual { aspect-ratio: 1.22; }
  .gadget-card__body { min-height: 88px; }
  .gadget-card__description { display: none; }
  .placeholder-ring { transform: scale(.6); }
  .home-lower { margin-top: 39px; margin-bottom: 50px; }
  .home-lower--split { grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr); gap: 9px; }
  .home-lower--split .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-lower--split .latest-card__visual { aspect-ratio: 1.16; }
  .home-lower--split .latest-card__content { padding: 8px; }
  .home-lower--split .latest-card__content h3 { font-size: 10px; line-height: 1.45; margin: 4px 0 7px; min-height: 0; }
  .home-lower--split .latest-card__content time { font-size: 9px; }
  .home-lower--split .latest-card__content .card-tag { font-size: 9px; letter-spacing: .01em; }
  .home-lower .about-panel { border-radius: 12px; padding: 12px 10px 15px; }
  .home-lower .about-panel__image { margin-bottom: 10px; border-radius: 8px; }
  .home-lower .about-panel h2 { font-size: clamp(12px, 3.2vw, 15px); line-height: 1.5; margin: 2px 0 8px; }
  .home-lower .about-panel .section-label { font-size: 9px; }
  .about-panel__description { font-size: 10px; line-height: 1.7; margin-bottom: 10px; }
  .about-panel__link { font-size: 10px; }
}
@media (max-width: 360px) {
  .wrap { width: min(100% - 24px, var(--container)); }
  .hero--wireframe.hero--with-tools { padding: 23px 15px; }
  .study-grid { gap: 7px; }
  .study-feature { padding: 12px; }
  .study-link { padding: 7px; }
  .study-link .arrow-circle { width: 17px; height: 17px; font-size: 10px; }
  .feature-title { font-size: 16px; }
  .gadget-grid { gap: 7px; }
  .gadget-card__body { padding: 9px 7px 11px; }
  .home-lower--split { gap: 8px; }
  .home-lower .about-panel { padding: 10px 8px; }
}

/* v0.7.0 — both primary hero links use the SAME white design. */
.hero-actions .button,
.hero-actions .button-primary,
.hero-actions .button-secondary {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #09243b;
  box-shadow: 0 3px 16px rgba(1, 11, 25, .15);
}
.hero-actions .button:hover,
.hero-actions .button-primary:hover,
.hero-actions .button-secondary:hover {
  background: #e8f2ff;
  border-color: #e8f2ff;
  color: #09243b;
}
.hero-actions .button:focus-visible { outline: 3px solid #8dd2ff; outline-offset: 3px; }
/* The three small study cards KEEP editable explanations visible on phones. */
@media (max-width: 540px) {
  .study-link-text { display: block; font-size: clamp(9px, 2.4vw, 10.5px); line-height: 1.45; color: #bdcee0; }
  .study-link-copy { gap: 3px; min-width: 0; }
  .study-link .arrow-circle { width: 19px; height: 19px; font-size: 10px; }
  .gadget-card__description { display: block; font-size: 9px; line-height: 1.5; }
  .gadget-card__body { min-height: 86px; }
  .hero-actions .button { font-size: clamp(10px, 2.7vw, 12px); padding: 10px 13px; min-height: 41px; }
}
/* Shared readable article pages, blog indexes, search, and pagination. */
.article-surface { color: #263849; color-scheme: light; background: #fbfdff; }
.article-surface :where(h1,h2,h3,h4,h5,h6) { color: #162c40; }
.article-surface .entry-content { font-size: 15px; line-height: 2; }
.article-surface .entry-content :where(p,ul,ol) { margin-bottom: 1.5em; }
.article-surface .entry-content a, .article-surface .archive-item a { color: #0961a0; text-decoration: underline; text-underline-offset: 3px; }
.article-surface .entry-content a:hover, .article-surface .archive-item a:hover { color: #053d68; }
.article-surface :where(img,iframe,video,embed,object) { max-width: 100%; }
.article-surface .entry-content img { height: auto; }
.article-surface :where(pre,.wp-block-preformatted) { overflow-x: auto; max-width: 100%; }
.article-surface .entry-content table { border-collapse: collapse; width: 100%; }
.article-surface .entry-content :where(th,td) { border: 1px solid #d6e0e9; padding: .65em; }
.article-surface .entry-content :where(blockquote,.wp-block-quote) { margin-inline: 0; padding: 16px 22px; background: #edf5fb; border-left: 4px solid #58a6ff; }
.article-surface .entry-content .wp-block-image { max-width: 100%; }
.article-surface .entry-content .wp-block-code { overflow-x: auto; }
.article-surface .entry-content :where(.information-box,.success-box,.alert-box,.primary-box,.blank-box) {
  padding: 16px 20px; margin: 1.4em 0; border-radius: 9px; background: #eef5fb; border: 1px solid #cfdfed;
}
.article-surface .entry-content .alert-box { border-color: #e4b88a; background: #fff7ed; }
.article-surface .entry-content .success-box { border-color: #a5cbaa; background: #f3faf3; }
.article-surface .entry-content .blogcard { max-width: 100%; overflow-wrap: anywhere; }
.entry-featured-image { margin: 20px 0 30px; }
.entry-featured-image img { width: auto; max-width: 100%; max-height: 440px; height: auto; object-fit: contain; border-radius: 12px; margin-inline: auto; }
.entry-meta-line { display: flex; gap: 14px; flex-wrap: wrap; color: #5f7489; font-size: 13px; margin-block: 8px 19px; }
.entry-taxonomy { margin-top: 26px; font-size: 13px; }
.entry-taxonomy a { color: #0961a0; text-decoration: underline; }
.post-navigation { margin-top: 40px; padding-top: 20px; border-top: 1px solid #d9e5ee; }
.post-navigation a { color: #0961a0; }
.site-search { display: flex; gap: 8px; margin-block: 25px; max-width: 550px; }
.site-search input[type=search] { min-width: 0; flex: 1; padding: 11px 13px; border: 1px solid #9db7c9; border-radius: 8px; }
.site-search button { border: none; background: #1768a6; color: white; padding: 9px 19px; border-radius: 8px; cursor: pointer; }
.article-surface .pagination { margin-top: 30px; }
.article-surface .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.article-surface .pagination a, .article-surface .pagination .current { display: inline-block; padding: 6px 14px; background: #e8f2fc; border-radius: 7px; color: #134f7b; }
.article-surface .pagination .current { background: #134f7b; color: white; }
.article-surface .archive-list { display: grid; gap: 16px; }
.article-surface .archive-item { border: 1px solid #dfebf3; border-radius: 9px; padding: 22px; }
.article-surface .archive-item h2 { font-size: 19px; line-height: 1.55; margin: 0 0 10px; }
.article-surface .archive-item p { font-size: 14px; margin: 10px 0; }
.article-surface .archive-item time { color: #5c7387; font-size: 12px; }
.widget-after-post { margin-top: 35px; }
.widget-after-post > :first-child { margin-top: 0; }
/* Correct the default global light color scheme only within article surfaces. */
.content-page__paper, .article-surface { overflow-wrap: anywhere; }
@media (max-width: 540px) {
  .article-surface .entry-content { font-size: 14px; }
  .article-surface .archive-item { padding: 14px; }
  .article-surface .archive-item h2 { font-size: 16px; }
}

.brand--image .custom-logo-link { display: inline-block; }
.brand--image img { max-height: 52px; width: auto; object-fit: contain; }
@media (max-width: 540px) { .brand--image img { max-height: 41px; } }

/* v0.7.1: editable draft labels are visible even before URLs are configured. */
.menu-placeholder { display: inline-block; padding-block: 8px; font-size: 13px; font-weight: 700; color: #dbe8f4; }
.section-link--draft, .about-panel__link--draft { cursor: default; }
.hero-actions .button--draft { cursor: default; }
.hero-actions .button--draft:hover { transform: none; background: #ffffff; color: #0b2941; }
@media (max-width: 767px) {
  .mobile-navigation .menu-placeholder { display: block; padding: 12px 14px; font-size: 13px; }
}


/* The dedicated bobnoblog companion plugin styles the TOC and AdSense units. */


/* v1.2.0 | Archive thumbnail cards; no content or attachment metadata changes. */
.bnb-archive-page .bnb-archive-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px;
}
.bnb-archive-page .bnb-archive-card {
  padding:0; min-width:0; overflow:hidden;
  border:1px solid #d6e6f2; border-radius:14px; background:#fff;
  box-shadow:0 7px 20px rgba(10,49,78,.035);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.bnb-archive-page .bnb-archive-card:hover { transform:translateY(-3px);border-color:#90bddd;box-shadow:0 16px 30px rgba(10,49,78,.11); }
.bnb-archive-page .bnb-archive-card__link,
.bnb-archive-page .bnb-archive-card__link:hover { display:flex; flex-direction:column; color:#1b3549; text-decoration:none; height:100%; }
.bnb-archive-page .bnb-archive-card__link:focus-visible { outline:3px solid #1779b9; outline-offset:-3px; }
.bnb-archive-page .bnb-archive-card__media {display:block;width:100%;aspect-ratio:16/9;background:#123650;overflow:hidden;}
.bnb-archive-page .bnb-archive-card__image { width:100%;height:100%;object-fit:cover;transition:transform .25s ease; }
.bnb-archive-page .bnb-archive-card:hover .bnb-archive-card__image {transform:none;}
.bnb-archive-page .bnb-archive-card__placeholder {width:100%;height:100%;display:grid;place-items:center;background:radial-gradient(circle at 75% 30%,#2b5b80 0,transparent 44%),linear-gradient(135deg,#0b2336,#16415f);}
.bnb-archive-page .bnb-archive-card__placeholder-logo {font-size:clamp(17px,2.4vw,24px);color:#e8f5ff;font-weight:700;letter-spacing:-.04em;}
.bnb-archive-page .bnb-archive-card__copy {display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:9px;padding:18px 20px 19px;min-width:0;}
.bnb-archive-page .bnb-archive-card__category {color:#1169a7;background:#eaf5fc;border-radius:100px;padding:2px 10px;font-size:11px;font-weight:700;line-height:1.9;}
.bnb-archive-page .bnb-archive-card__title {font-size:clamp(16px,1.35vw,19px);font-weight:700;line-height:1.55;color:#15324b;overflow-wrap:anywhere;}
.bnb-archive-page .bnb-archive-card__excerpt {font-size:13px;line-height:1.7;color:#526a7d;overflow-wrap:anywhere;}
.bnb-archive-page .bnb-archive-card__date {font-size:12px;margin-top:auto;padding-top:8px;color:#698195;}
@media(max-width:650px){
  .bnb-archive-page .bnb-archive-grid{grid-template-columns:minmax(0,1fr);gap:15px;}
  .bnb-archive-page .bnb-archive-card__copy{padding:15px 16px 17px;}
  .bnb-archive-page .bnb-archive-card__title{font-size:16px;}
  .bnb-archive-page .bnb-archive-card__excerpt{font-size:12px;}
}


/* v2.0.0 — research-led navigation, editorial picks and related reading. */
.bnb-header-controls{display:flex;align-items:center;gap:18px;min-width:0}
.bnb-search-panel{position:relative;flex:none}
.bnb-search-panel>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:38px;height:38px;border:1px solid #33536f;border-radius:50%;background:#112c44;color:#e7f6ff;font-size:26px;line-height:1}
.bnb-search-panel>summary::-webkit-details-marker{display:none}
/* v2.4.11: rounded rectangle search trigger; SVG geometry stays centered. */
.bnb-search-panel>summary {
  width: 48px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid #42698a;
  background: linear-gradient(150deg,#183b57,#0d293e);
  color: #e8f6ff; font-size: inherit; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.bnb-search-panel>summary .bnb-search-panel__icon {
  display: block; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
  margin: 0; padding: 0;
}
.bnb-search-panel>summary:hover,
.bnb-search-panel[open]>summary {
  color: #fff; border-color: #78c5ff;
  background: linear-gradient(150deg,#225779,#143955);
  box-shadow: 0 0 0 2px rgba(88,166,255,.14),0 0 18px rgba(74,167,255,.42);
}
.bnb-search-panel>summary:focus-visible {
  outline: 2px solid #9ad8ff; outline-offset: 3px;
  box-shadow:0 0 0 3px rgba(88,166,255,.18),0 0 18px rgba(74,167,255,.44);
}
@media(max-width:767px) {
  .bnb-search-panel>summary { width: 44px; height: 40px; border-radius: 11px; }
}
@media(prefers-reduced-motion:reduce) {
  .bnb-search-panel>summary { transition:none; }
}

.bnb-search-panel[open]>summary{background:#264967}
.bnb-search-panel__body{position:absolute;right:0;top:calc(100% + 14px);width:min(400px,calc(100vw - 28px));padding:12px;background:#102b42;border:1px solid #37607f;border-radius:14px;box-shadow:0 24px 45px rgba(0,0,0,.3);z-index:90}
.bnb-search-panel__body .site-search{margin:0;max-width:none}
.bnb-search-panel__body input{background:#fff;color:#16344c;min-width:0}
.bnb-search-panel__body button{white-space:nowrap}
.bnb-discovery{display:flex;align-items:center;gap:26px;flex-wrap:wrap;margin:26px 0 3px;border:1px solid #24445b;background:#0c2031;border-radius:16px;padding:15px 22px}
.bnb-discovery__title{font-size:13px;color:#b6d4e8;letter-spacing:.025em}
.bnb-discovery__links{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.bnb-discovery__links a{display:inline-block;padding:7px 16px;background:#1c3b55;border:1px solid #355978;border-radius:999px;font-size:13px;font-weight:700;color:#e8f5ff;transition:background .18s,transform .18s}
.bnb-discovery__links a:hover{background:#2c5677;transform:translateY(-1px)}
.bnb-highlights__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.bnb-highlight-card{background:#10263b;border:1px solid #2a4c68;border-radius:14px;overflow:hidden;min-width:0;transition:border-color .15s,transform .15s}
.bnb-highlight-card:hover{border-color:#58a6ff;transform:translateY(-2px)}
.bnb-highlight-card a{display:block;height:100%;color:inherit}
.bnb-highlight-card__media{display:block;aspect-ratio:16/9;background:#163f5b;overflow:hidden}
.bnb-highlight-card__img{display:block;width:100%;height:100%;object-fit:cover}
.bnb-highlight-card__fallback{display:block;width:100%;height:100%;background:radial-gradient(circle at 75% 38%,#36688c,transparent 45%),linear-gradient(125deg,#10304a,#18425b)}
.bnb-highlight-card__body{padding:16px 18px 19px}
.bnb-highlight-card__eyebrow{font-size:11px;font-weight:700;color:#89c9fa}
.bnb-highlight-card h3{font-size:clamp(14px,1.35vw,18px);line-height:1.6;margin:8px 0 10px;min-height:3em}
.bnb-highlight-card__read{color:#a8d8fb;font-size:12px;font-weight:700}
.bnb-post-topics{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 15px}
.bnb-post-topics a{display:inline-block;background:#e7f4ff;color:#1e628d;border-radius:99px;padding:4px 13px;font-size:12px;font-weight:700;text-decoration:none}
.bnb-author-line{display:block;margin:0 0 22px;font-size:13px;color:#526b7e}
.bnb-author-line a{color:#17618d;text-decoration:underline;text-underline-offset:2px}
.bnb-related{margin:46px 0 28px;padding-top:20px;border-top:1px solid #d4e3ef}
.bnb-related h2{color:#142c40;font-size:21px;line-height:1.4;margin:0 0 18px}
.bnb-related__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.bnb-related__item{min-width:0;border:1px solid #d5e5ef;background:#fff;border-radius:11px;overflow:hidden}
.bnb-related__item a{display:block;height:100%;text-decoration:none;color:#1b394e}
.bnb-related__media{display:block;aspect-ratio:16/10;background:#163b58;overflow:hidden}
.bnb-related__image{display:block;width:100%;height:100%;object-fit:cover}
.bnb-related__placeholder{display:block;height:100%;width:100%;background:radial-gradient(circle at 78% 35%,#2c5b80,transparent 48%),linear-gradient(130deg,#0c2137,#17405b)}
.bnb-related__item strong{display:block;font-size:13px;line-height:1.55;padding:13px}
.bnb-related__item a:hover strong{color:#126fa4}
.bnb-archive-description{font-size:14px;line-height:1.8;color:#b4cce0;margin:17px 0 0;max-width:760px}
.bnb-archive-description p{margin:0 0 8px}
@media(max-width:900px){
  .bnb-header-controls{gap:8px}
  .bnb-discovery{padding:12px 16px;gap:10px}
  .bnb-highlights__grid{gap:12px}
}
@media(max-width:600px){
  .bnb-search-panel>summary{width:35px;height:35px;font-size:24px}
  .bnb-discovery{margin:18px 0 0;padding:12px}
  .bnb-discovery__title{font-size:12px}
  .bnb-discovery__links{gap:6px;width:100%}
  .bnb-discovery__links a{flex:1;text-align:center;padding:7px 6px;font-size:11px;white-space:nowrap}
  .bnb-highlights__grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:7px;overscroll-behavior-inline:contain}
  .bnb-highlight-card{flex:0 0 min(75%,280px);scroll-snap-align:start}
  .bnb-highlight-card h3{font-size:14px}
  .bnb-related__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bnb-related__item:nth-child(3){display:none}
  .bnb-related__item strong{font-size:12px;padding:10px}
  /* Improve previous tiny captions while retaining the owner's three-card grid. */
  .gadget-card__description{font-size:11px;line-height:1.55}
  .gadget-card__title{font-size:clamp(11px,2.8vw,14px)}
  .study-link-text{font-size:11px}
  .home-lower--split .latest-card__content h3{font-size:12px;line-height:1.5}
  .home-lower--split .latest-card__content time{font-size:10px}
}
@media(max-width:360px){
  .bnb-discovery__links a{font-size:10px;padding:7px 4px}
  .bnb-related__grid{grid-template-columns:minmax(0,1fr)}
  .bnb-related__item:nth-child(3){display:block}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.bnb-highlight-card,.bnb-discovery__links a{transition:none}}

/* Mobile editorial readability: preserve desktop split, stack author profile on phones. */
@media (max-width:600px) {
  .home-lower--split { display:block; }
  .home-lower--split .home-section--latest { width:100%; }
  .home-lower--split .latest-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
  .home-lower--split .latest-card__content h3 {font-size:13px;line-height:1.6;}
  .home-lower--split .latest-card__content {padding:12px;}
  .home-lower--split .latest-card__content .card-tag {font-size:10px;}
  .home-lower--split .latest-card__content time {font-size:11px;}
  .home-lower--split .home-about { margin-top:30px; }
  .home-lower--split .about-panel {padding:22px 20px;}
  .home-lower--split .about-panel h2 {font-size:21px;}
  .home-lower--split .about-panel__description {font-size:13px;line-height:1.9;}
  .home-lower--split .about-panel__link {font-size:13px;}
  .study-link-title {font-size:12px;}
  .study-link-text {font-size:11px;line-height:1.55;}
}

/* v2.2.3 — Give the homepage a generous desktop canvas.
   Article reading surfaces retain their existing comfortable measure.
   Mobile and tablet layouts retain their previous gutter rules. */
@media (min-width: 1024px) {
  body.home .wrap {
    width: min(calc(100% - 64px), 1680px);
  }
}

/* v2.2.8 — Allow the hero description to use the available desktop width.
   The 625px measure made Japanese sentences break awkwardly.
   Leave the mobile/tablet layout untouched and let text wrap naturally
   when the actual viewport is too narrow. */
@media (min-width: 901px) {
  .homepage .hero:not(.hero--with-tools) .hero-copy {
    width: 100%;
    max-width: 1120px;
  }
  .homepage .hero:not(.hero--with-tools) .hero-description {
    max-width: 100%;
    white-space: normal;
  }
}

/* v2.3.9: Robust five-card KOSEN section layout.
 * Place this in the BASE stylesheet too. The home-refresh stylesheet is
 * conditional and some WP front-page configurations may not enqueue it;
 * the earlier layout only existed there, leaving the four small cards
 * stacked in a column. With this base rule, the intended grid always works
 * when front-page.php outputs the .homepage / #kosen markup.
 * Desktop  : feature (2/3) + study card 1 (1/3) on row 1,
 *            study cards 2, 4, 3, equal thirds on row 2.
 * Mobile   : feature full width, then 2 columns for the four small cards.
 */
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: minmax(252px, auto) minmax(174px, auto);
  gap: 14px;
  align-items: stretch;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) > .study-links {
  display: contents;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) > .study-feature {
  grid-column: 1 / span 4;
  grid-row: 1;
  min-height: 252px;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link {
  min-width: 0;
  min-height: 0;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--1 {
  grid-column: 5 / span 2;
  grid-row: 1;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--2 {
  grid-column: 1 / span 2;
  grid-row: 2;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--4 {
  grid-column: 3 / span 2;
  grid-row: 2;
}
body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--3 {
  grid-column: 5 / span 2;
  grid-row: 2;
}
/* If the owner empties the optional fourth small card, use a 2-card bottom row. */
body .homepage #kosen .study-grid.study-grid--modern.study-grid--four:not(.study-grid--single) .study-link--2 {
  grid-column: 1 / span 3;
}
body .homepage #kosen .study-grid.study-grid--modern.study-grid--four:not(.study-grid--single) .study-link--3 {
  grid-column: 4 / span 3;
}
@media (max-width: 720px) {
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 10px;
  }
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) > .study-feature {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 220px;
  }
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--1,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--2,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--3,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--4 {
    grid-column: auto;
    grid-row: auto;
    min-height: 108px;
    padding: 15px 12px;
  }
}
@media (max-width: 390px) {
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) {
    grid-template-columns: minmax(0, 1fr);
  }
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--1,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--2,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--3,
  body .homepage #kosen .study-grid.study-grid--modern:not(.study-grid--single) .study-link--4 {
    min-height: 76px;
  }
}


/* v2.4.6: use only natural line wrapping and explicit manual line breaks on homepage cards. */
.homepage :is(
  #kosen .section-description,
  #kosen .feature-text,
  #kosen .study-link-title,
  #kosen .study-link-text,
  #gadgets .section-description,
  #gadgets .gadget-card__title,
  #gadgets .gadget-card__description,
  #other .section-description,
  #other .bnb-other__title,
  #other .bnb-other__description,
  .home-lower--stacked .about-panel__description
) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: wrap;
}
.homepage :is(#kosen .feature-title, #kosen .study-link-title, #gadgets .gadget-card__title, #other .bnb-other__title, .home-lower--stacked .about-panel h2) {
  text-wrap: wrap;
}
.homepage .feature-text { max-width: none; }
.homepage #other .bnb-other__number { display: none !important; }
.homepage #other .bnb-other__card { gap: 10px; }

/* Small-screen button size applies after legacy responsive rules. */
@media(max-width:767px){.bnb-header-controls .bnb-search-panel>summary{width:44px;height:40px;border-radius:11px;font-size:inherit;}}
