/*
Theme Name: Green Energy B2B — 低圧蓄電池
Theme URI: https://green-energy.co.jp/
Author: Green Energy & Company
Author URI: https://green-energy.co.jp/
Description: 低圧蓄電池をB2B向けに販売する製品サイトのための WordPress 7.0 ブロックテーマ（FSE）。Green Energy デザインシステム準拠。記事詳細・一覧アーカイブ・固定ページ（標準／ランディング）テンプレートと、再利用可能なブロックパターンを同梱します。
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.1
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: green-energy-b2b
Tags: block-patterns, full-site-editing, blog, business, custom-colors, editor-style, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Green Energy B2B — supplemental front-end + editor styles
   Design tokens are defined in theme.json (presets). This file carries the
   signature component looks that presets alone cannot express.
   ========================================================================== */

:root {
  --ge-leaf: #00A889;
  --ge-leaf-hover: #008F73;
  --ge-forest: #00735C;
  --ge-sprout: #6CD0B8;
  --ge-sun: #F5C518;
  --ge-sun-warm: #E8881A;
  --ge-sky: #4AA3D9;
  --ge-cream: #F8F5EE;
  --ge-cream-2: #EFEBDF;
  --ge-ink: #1F1D1A;
  --ge-ink-2: #58544D;
  --ge-ink-3: #8B8679;
  --ge-divider: #E4DFD4;
  --ge-r-sm: 4px;
  --ge-r-md: 8px;
  --ge-shadow-1: 0 1px 2px rgba(31,29,26,.04);
  --ge-shadow-2: 0 4px 20px rgba(31,29,26,.08);
  --ge-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- Signature small-caps section label ---------- */
.ge-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ge-ink-2);
}
.ge-label.has-text-color { color: currentColor; }

/* ---------- Header ---------- */
.ge-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ge-divider);
  margin-top: 0;
}
.ge-header__inner { padding: 12px 32px !important; }
.ge-header .wp-block-navigation { font-size: 12px; font-weight: 700; letter-spacing: .04em; column-gap: 26px; }
.ge-header .wp-block-navigation a { color: var(--ge-ink); }
.ge-header .wp-block-navigation a:hover { color: var(--ge-leaf); text-decoration: none; }
.ge-header .wp-block-site-logo img { width: 140px; height: auto; }

/* ---------- Buttons: pill, brand ---------- */
.wp-block-button__link { transition: background .2s, color .2s, box-shadow .2s; }
.wp-block-button__link:active { transform: translateY(1px); }
.wp-block-button.is-style-outline .wp-block-button__link {
  border: 1.5px solid var(--ge-ink); color: var(--ge-ink); background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ge-ink); color: #fff; }
.is-style-ge-sun .wp-block-button__link, .wp-block-button.is-style-ge-sun .wp-block-button__link { background: var(--ge-sun); color: var(--ge-ink); }
.is-style-ge-ghost .wp-block-button__link { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.is-style-ge-ghost .wp-block-button__link:hover { background: rgba(255,255,255,.1); }

/* ---------- Chips (block style for taxonomy / labels) ---------- */
.ge-chip, .wp-block-post-terms.ge-chip a, a.ge-chip {
  display: inline-flex; align-items: center; padding: 5px 13px;
  border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; line-height: 1.4;
}
.ge-chip--green { background: #D7F0E8; color: var(--ge-forest); }
.ge-chip--sun { background: #FDF4D6; color: #A0811B; }
.ge-chip--sky { background: #E6F1F9; color: #1E5377; }
.ge-chip--ink { background: var(--ge-ink); color: #fff; }
.wp-block-post-terms.ge-chip a { background: #D7F0E8; color: var(--ge-forest); }

/* ---------- Breadcrumb ---------- */
.ge-breadcrumb { font-size: 12.5px; color: var(--ge-ink-3); }
.ge-breadcrumb a { color: var(--ge-ink-2); }

/* ---------- Meta (date etc.) ---------- */
.ge-meta, .ge-date, .wp-block-post-date.ge-date { font-family: var(--ge-mono); font-size: 13px; color: var(--ge-ink-3); }

/* ---------- Article content (post-content / page constrained) ---------- */
.entry-content { font-size: 16px; line-height: 1.95; }
.entry-content h2 { font-size: 26px; font-weight: 500; line-height: 1.5; letter-spacing: .01em; margin: 48px 0 18px; scroll-margin-top: 96px; }
.entry-content h3 { font-size: 18px; font-weight: 700; line-height: 1.6; margin: 30px 0 12px; }
.entry-content p { margin: 0 0 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 22px; padding-left: 1.4em; }
.entry-content li { margin: 0 0 8px; }
.entry-content figure { margin: 26px 0; }
.entry-content figcaption, .wp-element-caption { font-size: 12.5px; color: var(--ge-ink-3); margin-top: 10px; line-height: 1.7; }
.entry-content blockquote, .wp-block-quote {
  border-left: 3px solid var(--ge-divider); margin: 26px 0; padding: 6px 0 6px 26px;
  font-family: "Noto Serif JP", serif; font-size: 19px; line-height: 2; font-style: normal; color: var(--ge-ink);
}
.entry-content blockquote cite, .wp-block-quote cite { display: block; font-family: "Noto Sans JP", sans-serif; font-size: 13px; font-style: normal; color: var(--ge-ink-2); margin-top: 14px; }

/* ---------- Tables ---------- */
.entry-content table, .wp-block-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.wp-block-table th, .entry-content th { background: var(--ge-cream-2); text-align: left; font-weight: 700; padding: 13px 16px; border-bottom: 2px solid var(--ge-divider); }
.wp-block-table td, .entry-content td { padding: 13px 16px; border-bottom: 1px solid var(--ge-divider); }

/* ---------- Callout box (block style on core/group) ---------- */
.ge-callout { border-radius: 0 var(--ge-r-sm) var(--ge-r-sm) 0; padding: 18px 22px; margin: 24px 0; }
.ge-callout .ge-label { display: block; margin-bottom: 6px; }
.ge-callout p { margin: 0; font-size: 15px; line-height: 1.9; }
.ge-callout--point { background: #D7F0E8; border-left: 3px solid var(--ge-leaf); }
.ge-callout--point .ge-label { color: var(--ge-forest); }
.ge-callout--check { background: #FDF4D6; border-left: 3px solid var(--ge-sun-warm); }
.ge-callout--check .ge-label { color: #A0811B; }

/* ---------- Placeholder image (empty image blocks in patterns) ---------- */
.wp-block-image.is-ge-placeholder { background: var(--ge-cream-2); border-radius: var(--ge-r-sm); min-height: 140px; overflow: hidden; }
.wp-block-image.is-ge-placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-block-post-featured-image img { object-fit: cover; }

/* ---------- FAQ (core/details) ---------- */
.ge-faq .wp-block-details { border-bottom: 1px solid var(--ge-divider); padding: 4px 0; }
.ge-faq .wp-block-details summary { cursor: pointer; list-style: none; padding: 18px 4px; font-size: 15.5px; font-weight: 700; color: var(--ge-ink); position: relative; padding-right: 36px; }
.ge-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.ge-faq .wp-block-details summary::after { content: "＋"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: "Inter", sans-serif; font-size: 20px; font-weight: 400; color: var(--ge-leaf); }
.ge-faq .wp-block-details[open] summary::after { content: "−"; }
.ge-faq .wp-block-details > *:not(summary) { padding: 0 4px 20px; font-size: 14px; line-height: 1.95; color: var(--ge-ink-2); }

/* ---------- TOC (grouped links) ---------- */
.ge-toc { border: 1px solid var(--ge-divider); border-radius: var(--ge-r-md); padding: 20px 24px; }
.ge-toc .ge-label { display: block; margin-bottom: 12px; }
.ge-toc a { color: var(--ge-ink-2); font-size: 13.5px; font-weight: 600; }

/* ---------- Card (query loop items, related) ---------- */
.ge-card { background: #fff; border: 1px solid var(--ge-divider); border-radius: var(--ge-r-md); overflow: hidden; height: 100%; transition: box-shadow .2s, transform .2s; }
.ge-card:hover { box-shadow: var(--ge-shadow-2); transform: translateY(-2px); }
.ge-card .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.ge-card .wp-block-post-title { font-size: 15px; font-weight: 700; line-height: 1.6; }
.ge-card .wp-block-post-title a { color: var(--ge-ink); }
.ge-card .wp-block-post-excerpt__excerpt { font-size: 13px; line-height: 1.85; color: var(--ge-ink-2); }

/* ---------- Query pagination (numbered) ---------- */
.wp-block-query-pagination { gap: 8px; justify-content: center; margin-top: 48px; }
.wp-block-query-pagination-numbers .page-numbers,
.wp-block-query-pagination a, .wp-block-query-pagination .wp-block-query-pagination-numbers .current {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ge-divider); border-radius: 8px; background: #fff; color: var(--ge-ink);
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 14px; text-decoration: none;
}
.wp-block-query-pagination-numbers .current { background: var(--ge-leaf); color: #fff; border-color: var(--ge-leaf); }

/* ---------- Sidebar filter (categories / archives blocks) ---------- */
.ge-filter .wp-block-heading { font-size: 12px; font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.ge-filter ul { list-style: none; margin: 0 0 26px; padding: 0; }
.ge-filter li { margin: 0; }
.ge-filter li a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ge-ink-2); text-decoration: none; }
.ge-filter li a:hover { background: var(--ge-cream); color: var(--ge-leaf); }
.ge-filter .wp-block-search__input { border: 1px solid var(--ge-divider); border-radius: 8px; padding: 11px 14px; font-size: 13.5px; }
.ge-filter .wp-block-search__button { border-radius: 8px; background: var(--ge-leaf); color: #fff; border: none; font-weight: 700; }

/* ---------- Footer ---------- */
.ge-footer { background: var(--ge-cream-2); padding: 80px 32px 32px; margin-top: 0; }
.ge-footer a { color: var(--ge-ink-2); text-decoration: none; font-size: 12px; }
.ge-footer a:hover { color: var(--ge-leaf); }
.ge-footer__coltitle { font-size: 12px; font-weight: 700; color: var(--ge-ink); letter-spacing: .04em; margin-bottom: 14px; }
.ge-footer__social img { width: 30px; height: 30px; opacity: .8; }
.ge-footer__social a:hover img { opacity: 1; }
.ge-footer__tagline { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; color: var(--ge-forest); font-size: 14px; }
.ge-footer__copy { font-size: 11px; color: var(--ge-ink-3); }
.ge-footer__legal { font-size: 11px; color: var(--ge-ink-2); }
.ge-footer .wp-block-separator { border-color: var(--ge-divider); color: var(--ge-divider); background-color: var(--ge-divider); opacity: 1; margin: 0; }
.ge-brand { display: inline-flex; align-items: center; }

/* ---------- Block-style aliases (register_block_style → style.css) ---------- */
.wp-block-group.is-style-ge-callout-point { background: #D7F0E8; border-left: 3px solid var(--ge-leaf); border-radius: 0 var(--ge-r-sm) var(--ge-r-sm) 0; padding: 18px 22px; }
.wp-block-group.is-style-ge-callout-point .ge-label { color: var(--ge-forest); }
.wp-block-group.is-style-ge-callout-check { background: #FDF4D6; border-left: 3px solid var(--ge-sun-warm); border-radius: 0 var(--ge-r-sm) var(--ge-r-sm) 0; padding: 18px 22px; }
.wp-block-group.is-style-ge-callout-check .ge-label { color: #A0811B; }
.wp-block-group.is-style-ge-card { background: #fff; border: 1px solid var(--ge-divider); border-radius: var(--ge-r-md); overflow: hidden; }
.wp-block-post-terms.is-style-ge-chip a { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; background: #D7F0E8; color: var(--ge-forest); }

/* ---------- Number badges (flow / features) ---------- */
.ge-num { font-family: "Inter", sans-serif; font-weight: 700; color: var(--ge-leaf); }

/* ---------- Stat figure ---------- */
.ge-stat { font-family: "Inter", sans-serif; font-weight: 700; color: var(--ge-forest); line-height: 1; }

/* ---------- Download page: trust strip ---------- */
.ge-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ge-trust__item { display: flex; gap: 12px; align-items: center; background: var(--ge-cream); border-radius: var(--ge-r-md); padding: 16px 20px; }
.ge-trust__n { font-family: "Inter", sans-serif; font-weight: 700; font-size: 18px; color: var(--ge-leaf); flex: 0 0 auto; }
.ge-trust__item b { display: block; font-size: 13px; font-weight: 700; color: var(--ge-ink); line-height: 1.5; }
.ge-trust__item small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ge-ink-2); }

/* ---------- Download page: materials checklist ---------- */
.ge-materials { display: flex; flex-direction: column; gap: 12px; }
.ge-material { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--ge-divider); border-radius: var(--ge-r-md); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.ge-material:hover { border-color: var(--ge-leaf); }
.ge-material:has(input:checked) { border: 1.5px solid var(--ge-leaf); background: #F3FBF8; }
.ge-material input { width: 20px; height: 20px; accent-color: var(--ge-leaf); flex: 0 0 auto; cursor: pointer; }
.ge-material__pdf { width: 46px; height: 60px; border-radius: 4px; background: var(--ge-cream-2); display: flex; align-items: center; justify-content: center; font-family: "Inter", sans-serif; font-size: 9px; font-weight: 700; color: var(--ge-ink-3); flex: 0 0 auto; }
.ge-material__body { flex: 1; }
.ge-material__body b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ge-ink); }
.ge-material__body small { display: block; font-size: 12px; color: var(--ge-ink-2); margin-top: 3px; }
.ge-download-aside { position: sticky; top: 24px; }

/* ---------- Checklist (green ticks) ---------- */
.ge-checklist { list-style: none; margin: 0; padding: 0; }
.ge-checklist li { position: relative; padding-left: 26px; font-weight: 600; color: var(--ge-ink); }
.ge-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--ge-leaf); font-weight: 700; }

/* ---------- Download form (HTML block; replace with a form plugin in production) ---------- */
.ge-form-card { border: 1px solid var(--ge-divider); border-radius: 12px; padding: 32px; box-shadow: var(--ge-shadow-2); background: #fff; }
.ge-form-card__title { font-size: 18px; font-weight: 700; color: var(--ge-ink); margin-bottom: 4px; }
.ge-form-card__sub { font-size: 12.5px; color: var(--ge-ink-2); margin-bottom: 22px; }
.ge-form { display: flex; flex-direction: column; gap: 16px; }
.ge-form .ge-form__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ge-form label.ge-form__label { display: block; font-size: 12px; font-weight: 700; color: var(--ge-ink); margin-bottom: 6px; }
.ge-form .ge-form__req { color: var(--ge-sun-warm); font-weight: 700; }
.ge-form input, .ge-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--ge-divider); border-radius: 6px; font-family: inherit; font-size: 14px; color: var(--ge-ink); background: #fff; outline: none; box-sizing: border-box; }
.ge-form input:focus, .ge-form select:focus { border-color: var(--ge-leaf); box-shadow: 0 0 0 3px rgba(0,168,137,.12); }
.ge-form .ge-form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.7; color: var(--ge-ink-2); cursor: pointer; }
.ge-form .ge-form__consent input { width: auto; margin-top: 2px; accent-color: var(--ge-leaf); flex: 0 0 auto; }
.ge-form .ge-form__submit { width: 100%; border: none; border-radius: 999px; background: var(--ge-leaf); color: #fff; font-family: inherit; font-weight: 700; font-size: 15px; padding: 15px; cursor: pointer; transition: background .2s; }
.ge-form .ge-form__submit:hover { background: var(--ge-leaf-hover); }

/* ---------- GreenChord front page ---------- */
.gc-hero { position: relative; overflow: hidden; }
.gc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 80% 24%, rgba(0,168,137,.30), transparent 46%), radial-gradient(circle at 96% 88%, rgba(245,197,24,.12), transparent 42%); }
.gc-hero > * { position: relative; z-index: 1; }
.gc-eyebrow { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: #fff; }
.gc-eyebrow b { font-family: "Inter", sans-serif; color: var(--ge-sprout); letter-spacing: .1em; font-weight: 700; }
.gc-pill { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 15px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9); }
.gc-oncard { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: var(--ge-r-md); padding: 24px 22px; }
.gc-oncard .gc-oncard__t { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.gc-oncard p { font-size: 12.5px; line-height: 1.8; color: rgba(255,255,255,.75); margin: 0; }
.gc-frag { background: #fff; border: 1px dashed var(--ge-divider); border-radius: var(--ge-r-sm); padding: 12px 16px; font-size: 13.5px; color: var(--ge-ink-2); }
.gc-arrow { font-family: "Inter", sans-serif; font-size: 30px; color: var(--ge-leaf); font-weight: 700; text-align: center; }
.gc-corebox { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--ge-r-md); padding: 26px 22px; text-align: center; }
.gc-check { background: #fff; border-radius: var(--ge-r-sm); padding: 14px 16px; font-size: 13px; font-weight: 600; color: var(--ge-ink); position: relative; padding-left: 40px; }
.gc-check::before { content: "✓"; position: absolute; left: 16px; color: var(--ge-leaf); font-weight: 700; }
.gc-ticklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gc-ticklist li { position: relative; padding-left: 36px; font-size: 14px; color: var(--ge-ink); line-height: 1.7; min-height: 24px; }
.gc-ticklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 999px; background: #D7F0E8; color: var(--ge-forest); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ge-header__inner { padding: 12px 20px !important; }
  .entry-content h2 { font-size: 22px; }
  .ge-trust { grid-template-columns: 1fr; }
  .ge-form .ge-form__row2 { grid-template-columns: 1fr; }
  .ge-doc__toc { display: none; }
}

/* ---------- Regulatory document pages (security / legal) ---------- */
.ge-chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ge-doc__toc { position: sticky; top: 96px; align-self: start; }
.ge-doc__tocnav .ge-label { display: block; margin-bottom: 14px; }
.ge-doc__tocnav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--ge-divider); display: flex; flex-direction: column; gap: 11px; }
.ge-doc__tocnav li { margin: 0; }
.ge-doc__tocnav a { display: block; padding-left: 16px; font-size: 13px; line-height: 1.55; color: var(--ge-ink-2); text-decoration: none; }
.ge-doc__tocnav a:hover { color: var(--ge-leaf); }

.ge-doc { counter-reset: gesec; min-width: 0; }
.ge-doc__sec { padding-top: 32px; margin-top: 34px; border-top: 1px solid var(--ge-divider); }
.ge-doc > .ge-doc__sec:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.ge-doc__sec h2 { font-size: 20px; font-weight: 700; line-height: 1.55; margin: 0 0 14px; letter-spacing: 0; scroll-margin-top: 96px; }
.ge-doc__sec h2::before { counter-increment: gesec; content: counter(gesec, decimal-leading-zero) "　"; font-family: var(--ge-mono); font-size: 14px; font-weight: 700; color: var(--ge-leaf); }
.ge-doc__sec p { font-size: 15px; line-height: 1.95; margin: 0 0 16px; color: var(--ge-ink); }
.ge-doc__sec ul, .ge-doc__sec ol { margin: 0 0 4px; padding-left: 1.35em; line-height: 1.95; color: var(--ge-ink); }
.ge-doc__sec li { margin: 0 0 8px; font-size: 15px; }
.ge-doc__sec .is-style-ge-callout-point, .ge-doc__sec .is-style-ge-callout-check { margin: 20px 0 0; border-radius: 0 var(--ge-r-sm) var(--ge-r-sm) 0; }
.ge-doc__sec .is-style-ge-callout-point p:not(.ge-label), .ge-doc__sec .is-style-ge-callout-check p:not(.ge-label) { margin: 0; }

/* Definition table (row-header) for report windows / contents / risks */
.ge-doc__deftable table { font-size: 13.5px; }
.ge-doc__deftable th[scope="row"] { width: 30%; white-space: nowrap; vertical-align: top; background: var(--ge-cream); font-weight: 700; color: var(--ge-ink); border-bottom: 1px solid var(--ge-divider); }
.ge-doc__deftable td { vertical-align: top; line-height: 1.8; }
@media (max-width: 900px) { .ge-doc__deftable th[scope="row"] { white-space: normal; width: 34%; } }

/* Revision history footer */
.ge-doc__rev { margin-top: 40px; padding-top: 22px; border-top: 2px solid var(--ge-leaf); }
.ge-doc__rev p { margin: 0 0 6px; }
.ge-doc__revtable { margin-top: 14px; }
.ge-doc__revtable table { font-size: 12.5px; }
.ge-doc__revtable th { font-size: 12.5px; }
.ge-doc__revtable td { color: var(--ge-ink-2); }
