/**
 * MASAMUNE Design System v4.3.2
 * Clean & Readable - 視認性重視
 */

:root {
  /* メインカラー */
  /* White × Black with Blue Accent */
  --color-primary: #0B5CAB;        /* accent blue (links/CTA) */
  --color-primary-dark: #084A8A;
  --color-primary-light: #2B8CFF;

  /* Monochrome foundations */
  --color-ink: #0F172A;
  --color-ink-deep: #020617;
  --color-ink-muted: #334155;

  /* テキスト - コントラスト重視 */
  --color-text-dark: #1F2937;     /* 濃いグレー（白背景用） */
  --color-text-base: #374151;     /* 本文 */
  --color-text-light: #FFFFFF;    /* 白（ダーク背景用） */
  --color-text-muted: #9CA3AF;    /* 補助テキスト */

  /* 背景 - 明確な階層 */
  --color-bg-white: #FFFFFF;
  --color-bg-light: #F8FAFC;      /* ほぼ白 */
  --color-bg-dark: #0F172A;       /* ダークネイビー */
  --color-bg-darker: #020617;     /* ほぼ黒 */

  /* ボーダー・アクセント */
  --color-border: #E5E7EB;
  --color-border-dark: #111827;
  --color-accent: var(--color-primary);        /* blue only */
  --color-accent-warm: var(--color-primary);   /* blue only */

  /* フォント */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* シャドウ（控えめ＝エンタープライズ感） */
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.05);
  --shadow-md: 0 6px 18px rgba(2, 6, 23, 0.08);
  --shadow-lg: 0 14px 40px rgba(2, 6, 23, 0.10);

  /* 角丸（丸すぎない） */
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

/* ==========================================
   BASE
========================================== */
body {
  font-family: var(--font-sans);
  color: var(--color-text-base);
  background: var(--color-bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Site-wide layout (OpenText-like spacing & width) */
.masamune-theme .site-container,
.masamune-theme .content-container.site-container {
  max-width: 1280px;
}

.masamune-theme .content-container.site-container {
  padding-left: 24px;
  padding-right: 24px;
}

.masamune-theme .content-wrap {
  padding-top: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

/* ==========================================
   TYPOGRAPHY - 視認性重視
========================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-dark);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: clamp(2.0rem, 3.8vw, 3.0rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p {
  color: var(--color-text-base);
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--color-primary-dark);
}

/* Ensure monochrome: avoid random inline link/button colors bleeding through */
/* Keep *text links* blue even if inline styles try to override.
   IMPORTANT: Do NOT override button-like links (they often need white text on colored backgrounds). */
.masamune-theme a[style*="color:"]:not([style*="background"]):not([style*="background-color"]):not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn),
.masamune-theme a[style*="color: "]:not([style*="background"]):not([style*="background-color"]):not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn) {
  color: var(--color-primary) !important;
}

/* Button-like anchors with colored backgrounds should keep readable text */
.masamune-theme a[style*="background:"][style*="padding"],
.masamune-theme a[style*="background-color:"][style*="padding"] {
  color: #fff !important;
}
.masamune-theme a[style*="background:#ffffff"][style*="padding"],
.masamune-theme a[style*="background: #ffffff"][style*="padding"],
.masamune-theme a[style*="background-color:#ffffff"][style*="padding"],
.masamune-theme a[style*="background-color: #ffffff"][style*="padding"],
.masamune-theme a[style*="background:white"][style*="padding"],
.masamune-theme a[style*="background: white"][style*="padding"],
.masamune-theme a[style*="background-color:white"][style*="padding"],
.masamune-theme a[style*="background-color: white"][style*="padding"] {
  color: var(--color-primary) !important;
}

/* ==========================================
   HEADER - 白背景、クリーン
========================================== */
.site-header,
#masthead {
  background: var(--color-bg-white) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
}

/* Header: hide the text title ("MASAMUNE Erasure") and keep logo only (all viewports) */
#masthead .site-title-wrap,
#masthead .site-title,
#masthead p.site-title,
.mobile-site-branding .site-title-wrap,
.mobile-site-branding .site-title,
.mobile-site-branding p.site-title {
  display: none !important;
}

.main-navigation a,
.primary-menu a,
nav ul.menu a {
  color: var(--color-text-base);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.main-navigation a:hover,
nav ul.menu a:hover {
  color: var(--color-primary);
  background: var(--color-bg-light);
}

.current-menu-item > a {
  color: var(--color-primary) !important;
  background: rgba(8, 145, 178, 0.08) !important;
}

/* ==========================================
   HERO SECTION - 白背景で明るく
========================================== */
.hero-section,
.wp-block-group.hero-section,
[class*="hero"] {
  background: var(--color-bg-white) !important;
  padding: 4rem 1.5rem !important;
  text-align: center;
}

.hero-section h1,
.hero-section .wp-block-heading {
  color: var(--color-text-dark) !important;
  margin-bottom: 1rem;
}

.hero-section p {
  color: var(--color-text-base) !important;
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

/* Badge - 明るい背景 */
.badge,
.hero-section .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg-light) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 100px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem;
  color: var(--color-text-base) !important;
  margin-bottom: 1.5rem;
}

/* ==========================================
   BUTTONS
========================================== */
.wp-block-button__link,
button,
.btn,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius) !important;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

/* Primary Button */
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.btn-primary {
  background: var(--color-primary) !important;
  color: var(--color-text-light) !important;
}

/* =========================================================
   CONTRAST GUARDRAILS (Light background buttons)
   - Fix "white text on white (or very light) background" across pages.
   - Applies to button-like links only.
   - Added support for "white" keyword in addition to hex code.
========================================================= */
.masamune-theme .entry-content .wp-block-button__link.has-white-background-color,
.masamune-theme .entry-content .wp-element-button.has-white-background-color,
.masamune-theme .entry-content a.wp-element-button.has-white-background-color,
.masamune-theme .entry-content a.wp-block-button__link.has-white-background-color,
.masamune-theme .entry-content .wp-block-button__link[style*="background:#fff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background: #fff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background:#ffffff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background: #ffffff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color:#fff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color: #fff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color:#ffffff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color: #ffffff"],
.masamune-theme .entry-content .wp-block-button__link[style*="background:white"],
.masamune-theme .entry-content .wp-block-button__link[style*="background: white"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color:white"],
.masamune-theme .entry-content .wp-block-button__link[style*="background-color: white"],
.masamune-theme .entry-content .wp-element-button[style*="background:#fff"],
.masamune-theme .entry-content .wp-element-button[style*="background: #fff"],
.masamune-theme .entry-content .wp-element-button[style*="background:#ffffff"],
.masamune-theme .entry-content .wp-element-button[style*="background: #ffffff"],
.masamune-theme .entry-content .wp-element-button[style*="background-color:#fff"],
.masamune-theme .entry-content .wp-element-button[style*="background-color: #fff"],
.masamune-theme .entry-content .wp-element-button[style*="background-color:#ffffff"],
.masamune-theme .entry-content .wp-element-button[style*="background-color: #ffffff"],
.masamune-theme .entry-content .wp-element-button[style*="background:white"],
.masamune-theme .entry-content .wp-element-button[style*="background: white"],
.masamune-theme .entry-content .wp-element-button[style*="background-color:white"],
.masamune-theme .entry-content .wp-element-button[style*="background-color: white"] {
  color: var(--color-text-dark) !important;
  text-shadow: none !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--color-primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline Button */
.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--color-primary) !important;
  border: 2px solid var(--color-primary) !important;
}

.is-style-outline .wp-block-button__link:hover {
  background: var(--color-primary) !important;
  color: var(--color-text-light) !important;
}

/* =========================================================
   CTA BUTTON ALIGNMENT (Site-wide)
   - Default buttons are often left-aligned by block settings.
   - We center-align CTA button groups in the CONTENT area only.
   - Explicit alignment classes still win (left/right/space-between).
========================================================= */
.masamune-theme .entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.masamune-theme .entry-content .wp-block-buttons:not(.is-content-justification-left):not(.is-content-justification-right):not(.is-content-justification-space-between) {
  justify-content: center !important;
}
.masamune-theme .entry-content .wp-block-buttons.is-content-justification-left {
  justify-content: flex-start !important;
}
.masamune-theme .entry-content .wp-block-buttons.is-content-justification-right {
  justify-content: flex-end !important;
}
.masamune-theme .entry-content .wp-block-buttons.is-content-justification-space-between {
  justify-content: space-between !important;
}
.masamune-theme .entry-content .wp-block-buttons .wp-block-button {
  margin: 0 !important;
}

/* =========================================================
   ICON BADGES (for leading ✓ / ✗ in lists)
   - We wrap the character with a span via WP-CLI so CSS can style it.
========================================================= */
/* Force horizontal alignment for list items with icons */
.masamune-theme .entry-content li:has(.masamune-icon) {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.6em !important;
}

.masamune-theme .entry-content li:has(.masamune-icon) br {
  display: none !important;
}

.masamune-theme .entry-content .masamune-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  /* margin-right: 0.5em; handled by gap in flex parent */
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  font-size: 0.9em;
  /* vertical-align: middle; */
  transform: translateY(2px); /* Adjust for text baseline */
  flex-shrink: 0;
}
.masamune-theme .entry-content .masamune-icon--ng {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.12);
  border: 1px solid rgba(185, 28, 28, 0.22);
}
.masamune-theme .entry-content .masamune-icon--ok {
  color: #047857;
  background: rgba(4, 120, 87, 0.12);
  border: 1px solid rgba(4, 120, 87, 0.22);
}

/* If lists use plain leading ✓/✗ characters (not wrapped), improve spacing/contrast slightly */
.masamune-theme .entry-content li {
  line-height: 1.7;
}
.masamune-theme .entry-content li::marker {
  color: rgba(15, 23, 42, 0.55);
}

/* ==========================================
   SECTIONS - 白/ライトグレー交互
========================================== */
section,
.wp-block-group {
  padding: 4rem 0;
}

/* 白背景セクション */
section,
.wp-block-group {
  background: var(--color-bg-white);
}

section h2,
section p,
.wp-block-group h2,
.wp-block-group p {
  color: var(--color-text-dark);
}

/* ライトグレー背景セクション */
section:nth-child(even),
.wp-block-group:nth-child(even) {
  background: var(--color-bg-light);
}

section:nth-child(even) h2,
section:nth-child(even) p,
.wp-block-group:nth-child(even) h2,
.wp-block-group:nth-child(even) p {
  color: var(--color-text-dark);
}

/* ダーク背景セクション（特別な場合） */
.dark-section,
.bg-dark {
  background: var(--color-bg-dark) !important;
}

.dark-section h2,
.dark-section h3,
.dark-section p,
.bg-dark h2,
.bg-dark h3,
.bg-dark p {
  color: var(--color-text-light) !important;
}

.dark-section .text-muted,
.bg-dark .text-muted {
  color: var(--color-text-muted) !important;
}

/* ==========================================
   CARDS - 常に白背景
========================================== */
.wp-block-column:not(.has-background):not([style*="background"]):not([style*="background-color"]),
.card,
[class*="card"] {
  background: var(--color-bg-white) !important;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem;
  transition: all 0.2s;
}

.wp-block-column h3,
.wp-block-column h4,
.wp-block-column p,
.card h3,
.card h4,
.card p {
  color: var(--color-text-dark);
}

.wp-block-column:hover,
.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================
   GRID
========================================== */
.wp-block-columns {
  display: grid !important;
  gap: 1.5rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

.wp-block-columns.has-2-columns { grid-template-columns: repeat(2, 1fr) !important; }
.wp-block-columns.has-3-columns { grid-template-columns: repeat(3, 1fr) !important; }
.wp-block-columns.has-4-columns { grid-template-columns: repeat(4, 1fr) !important; }

@media (max-width: 768px) {
  .wp-block-columns { grid-template-columns: 1fr !important; }
}

/* ==========================================
   TABLE - 白背景ベース
========================================== */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-white);
  box-shadow: var(--shadow-sm);
}

table th {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 1rem;
  font-weight: 600;
  text-align: left;
}

table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text-dark);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover td {
  background: var(--color-bg-light);
}

/* ==========================================
   FORMS - 白背景
========================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

label {
  display: block;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

/* ==========================================
   FOOTER - ダーク、白文字
========================================== */
footer,
.site-footer {
  background: var(--color-bg-dark) !important;
  color: var(--color-text-muted);
  padding: 3rem 0 1.5rem;
}

footer h3,
footer h4,
footer .widget-title {
  color: var(--color-text-light) !important;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

footer p {
  color: var(--color-text-muted) !important;
}

footer a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--color-text-light);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

.footer-bottom,
.site-info {
  border-top: 1px solid var(--color-border-dark);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================
   LATEST NEWS SECTION - 白背景
========================================== */
.masamune-news-section {
  padding: 4rem 0;
  background: var(--color-bg-light);
}

.masamune-news-section h3 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-text-dark);
}

.masamune-news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .masamune-news-grid {
    grid-template-columns: 1fr;
  }
}

.masamune-news-column {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
}

.masamune-news-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-primary);
}

.masamune-latest-posts .latest-post-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.masamune-latest-posts .latest-post-item:last-child {
  border-bottom: none;
}

.masamune-latest-posts .post-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.masamune-latest-posts a:hover .post-title {
  color: var(--color-primary);
}

.masamune-latest-posts .post-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.masamune-latest-posts .post-lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid rgba(11, 92, 171, 0.25);
  color: var(--color-primary);
  background: rgba(11, 92, 171, 0.06);
}

.masamune-news-column > p {
  margin-top: 1rem;
  text-align: right;
}

.masamune-news-column > p > a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* ==========================================
   FEATURE HIGHLIGHTS
========================================== */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-base);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* チェックマーク（緑） */
.check,
.checkmark {
  color: var(--color-accent);
}

/* ==========================================
   UTILITIES
========================================== */
/* ==========================================================================
   LAYOUT GUARDRAILS - Global Alignment Fixes (配置ズレの全体修正)
   ========================================================================== */

/* 1. Container Centering (コンテナの中央揃え徹底) */
.masamune-theme .site-container,
.masamune-theme .content-container,
.masamune-theme .entry-content > .wp-block-group > .wp-block-group__inner-container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1280px; /* 画面幅が広すぎてもコンテンツは中央に寄せる */
}

/* 2. Grid/Column Centering (カラムコンテナの中央配置) */
.masamune-theme .wp-block-columns {
    margin-left: auto !important;
    margin-right: auto !important;
    /* max-width: 100%; default */
}

/* 3. Text Alignment Enforcers (WordPress標準クラスの強制適用) */
.masamune-theme .has-text-align-center {
    text-align: center !important;
}
.masamune-theme .has-text-align-left {
    text-align: left !important;
}
.masamune-theme .has-text-align-right {
    text-align: right !important;
}

/* 4. Element Centering (Images, Blocks) */
.masamune-theme .aligncenter,
.masamune-theme .wp-block-image.aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
    text-align: center;
}

/* 5. Button Group Alignment (Default Center for Content Area) */
/* Override default left alignment unless specified otherwise */
.masamune-theme .entry-content .wp-block-buttons:not([class*="is-content-justification-"]) {
    justify-content: center !important;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary) !important; }
.text-dark { color: var(--color-text-dark) !important; }
.text-light { color: var(--color-text-light) !important; }
.text-muted { color: var(--color-text-muted) !important; }

.bg-white { background: var(--color-bg-white) !important; }
.bg-light { background: var(--color-bg-light) !important; }
.bg-dark { background: var(--color-bg-dark) !important; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Menu NEW badge */
.menu-item-new > a::after {
  content: 'NEW';
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--color-accent);
  color: var(--color-text-light);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ==========================================
   強制的な視認性修正
========================================== */
/* グレー背景での黒文字問題を修正 */
[style*="background"] h1,
[style*="background"] h2,
[style*="background"] h3,
[style*="background"] h4,
[style*="background"] p {
  color: inherit;
}

/* ==========================================
   CONTRAST GUARDRAILS (Dark background panels)
   - Many pages include inline-styled panels (div style="background: #xxxxxx") and
     Gutenberg/Kadence background classes.
   - Ensure readable text on strong/dark backgrounds, without breaking light surfaces.
========================================== */

/* 0) Gutenberg gradient background classes -> force white text inside */
.masamune-theme .entry-content [class*="-gradient-background"],
.masamune-theme .entry-content [class*="gradient-background"] {
  color: #fff !important;
}
.masamune-theme .entry-content [class*="-gradient-background"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [class*="gradient-background"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* 1) Inline strong/dark background colors -> force white text inside */
.masamune-theme .entry-content [style*="background:#1e3a8a"],
.masamune-theme .entry-content [style*="background: #1e3a8a"],
.masamune-theme .entry-content [style*="background-color:#1e3a8a"],
.masamune-theme .entry-content [style*="background-color: #1e3a8a"],
.masamune-theme .entry-content [style*="background:#1E3A8A"],
.masamune-theme .entry-content [style*="background: #1E3A8A"],
.masamune-theme .entry-content [style*="background-color:#1E3A8A"],
.masamune-theme .entry-content [style*="background-color: #1E3A8A"],
.masamune-theme .entry-content [style*="background:#1f2937"],
.masamune-theme .entry-content [style*="background: #1f2937"],
.masamune-theme .entry-content [style*="background-color:#1f2937"],
.masamune-theme .entry-content [style*="background-color: #1f2937"],
.masamune-theme .entry-content [style*="background:#0f172a"],
.masamune-theme .entry-content [style*="background: #0f172a"],
.masamune-theme .entry-content [style*="background-color:#0f172a"],
.masamune-theme .entry-content [style*="background-color: #0f172a"],
.masamune-theme .entry-content [style*="background:#111827"],
.masamune-theme .entry-content [style*="background: #111827"],
.masamune-theme .entry-content [style*="background-color:#111827"],
.masamune-theme .entry-content [style*="background-color: #111827"],
.masamune-theme .entry-content [style*="background:#32373c"],
.masamune-theme .entry-content [style*="background: #32373c"],
.masamune-theme .entry-content [style*="background-color:#32373c"],
.masamune-theme .entry-content [style*="background-color: #32373c"],
.masamune-theme .entry-content [style*="background:#2563eb"],
.masamune-theme .entry-content [style*="background: #2563eb"],
.masamune-theme .entry-content [style*="background-color:#2563eb"],
.masamune-theme .entry-content [style*="background-color: #2563eb"],
.masamune-theme .entry-content [style*="background:#7c3aed"],
.masamune-theme .entry-content [style*="background: #7c3aed"],
.masamune-theme .entry-content [style*="background-color:#7c3aed"],
.masamune-theme .entry-content [style*="background-color: #7c3aed"],
.masamune-theme .entry-content [style*="background:#9333ea"],
.masamune-theme .entry-content [style*="background: #9333ea"],
.masamune-theme .entry-content [style*="background-color:#9333ea"],
.masamune-theme .entry-content [style*="background-color: #9333ea"],
.masamune-theme .entry-content [style*="background:#16a34a"],
.masamune-theme .entry-content [style*="background: #16a34a"],
.masamune-theme .entry-content [style*="background-color:#16a34a"],
.masamune-theme .entry-content [style*="background-color: #16a34a"],
.masamune-theme .entry-content [style*="background:#dc2626"],
.masamune-theme .entry-content [style*="background: #dc2626"],
.masamune-theme .entry-content [style*="background-color:#dc2626"],
.masamune-theme .entry-content [style*="background-color: #dc2626"],
/* Removed Orange/Amber from here to fix visibility */
.masamune-theme .entry-content [style*="background:linear-gradient"],
.masamune-theme .entry-content [style*="background: linear-gradient"],
.masamune-theme .entry-content [style*="background-image:linear-gradient"],
.masamune-theme .entry-content [style*="background-image: linear-gradient"] {
  color: #fff !important;
}

.masamune-theme .entry-content [style*="background:#1e3a8a"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#1E3A8A"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#1f2937"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#0f172a"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#111827"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#32373c"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#2563eb"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#7c3aed"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#9333ea"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#16a34a"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#dc2626"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
/* Removed Orange/Amber from here */
.masamune-theme .entry-content [style*="background:linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-image:linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-image: linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: #fff !important;
}

/* Links on dark panels: keep readable (underline helps) */
.masamune-theme .entry-content [style*="background:#1e3a8a"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#1f2937"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#32373c"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#2563eb"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#7c3aed"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#9333ea"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#16a34a"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [style*="background:#dc2626"] a:not(.wp-block-button__link):not(.wp-element-button)
/* Removed Orange/Amber from here */
{
  color: rgba(255,255,255,0.92) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.masamune-theme .entry-content [style*="background:#1e3a8a"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#1f2937"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#32373c"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#2563eb"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#7c3aed"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#9333ea"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#16a34a"] a:not(.wp-block-button__link):not(.wp-element-button):hover,
.masamune-theme .entry-content [style*="background:#dc2626"] a:not(.wp-block-button__link):not(.wp-element-button):hover
/* Removed Orange/Amber from here */
{
  color: #fff !important;
}

/* 2) Tables: if a row sets background/color inline, respect it (avoid white-on-white / dark-on-dark). */
.masamune-theme table tr[style*="background"] > th,
.masamune-theme table tr[style*="background"] > td {
  background: inherit !important;
}
.masamune-theme table tr[style*="color"] > th,
.masamune-theme table tr[style*="color"] > td {
  color: inherit !important;
}

/* ==========================================
   HOMEPAGE (Front Page) - ITAD Enterprise polish
   - Inline styles on the homepage are common; we override with higher specificity.
   - Scope strictly to the homepage to avoid impacting other pages.
========================================== */
body.home.wp-singular.page .hero-section {
  /* Monochrome hero */
  background: radial-gradient(1200px 600px at 50% -100px, rgba(2, 6, 23, 0.10), transparent 60%),
              var(--color-bg-white) !important;
  padding-top: clamp(64px, 6vw, 96px) !important;
  padding-bottom: clamp(56px, 6vw, 92px) !important;
}

body.home.wp-singular.page .hero-section > .wp-block-group__inner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

body.home.wp-singular.page .hero-section .badge {
  background: rgba(2, 6, 23, 0.04) !important;
  border-color: rgba(2, 6, 23, 0.10) !important;
  color: var(--color-text-dark) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.home.wp-singular.page .hero-section h1.wp-block-heading {
  font-size: clamp(2.0rem, 4.2vw, 3.1rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  text-align: center !important;
}

/* Hero readability on blue/gradient backgrounds:
   If the hero container itself uses a gradient/dark background (inline), force light text. */
.masamune-theme .entry-content .hero-section[style*="linear-gradient"],
.masamune-theme .entry-content .wp-block-group.hero-section[style*="linear-gradient"],
.masamune-theme .entry-content [class*="hero"][style*="linear-gradient"],
.masamune-theme .entry-content .hero-section[style*="background:#2563eb"],
.masamune-theme .entry-content .hero-section[style*="background: #2563eb"],
.masamune-theme .entry-content .hero-section[style*="background-color:#2563eb"],
.masamune-theme .entry-content .hero-section[style*="background-color: #2563eb"],
.masamune-theme .entry-content .hero-section[style*="background:#1e3a8a"],
.masamune-theme .entry-content .hero-section[style*="background: #1e3a8a"],
.masamune-theme .entry-content .hero-section[style*="background-color:#1e3a8a"],
.masamune-theme .entry-content .hero-section[style*="background-color: #1e3a8a"] {
  color: #fff !important;
}
.masamune-theme .entry-content .hero-section[style*="linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content .wp-block-group.hero-section[style*="linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [class*="hero"][style*="linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content .hero-section[style*="background:#2563eb"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content .hero-section[style*="background:#1e3a8a"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.22);
}
.masamune-theme .entry-content .hero-section[style*="linear-gradient"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content .wp-block-group.hero-section[style*="linear-gradient"] a:not(.wp-block-button__link):not(.wp-element-button),
.masamune-theme .entry-content [class*="hero"][style*="linear-gradient"] a:not(.wp-block-button__link):not(.wp-element-button) {
  color: rgba(255,255,255,0.92) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.home.wp-singular.page .hero-section p.has-text-align-center {
  font-size: clamp(1.05rem, 2.1vw, 1.35rem) !important;
  max-width: 900px;
  margin-left: auto !important;
  margin-right: auto !important;
  color: var(--color-text-base) !important;
}

body.home.wp-singular.page .hero-section .wp-block-columns {
  gap: 1.25rem !important;
  margin-top: 1.75rem !important;
}

body.home.wp-singular.page .hero-section .wp-block-column {
  background: var(--color-bg-white) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  border-radius: 14px !important;
  padding: 28px !important;
  box-shadow: var(--shadow-sm) !important;
}

/* Neutralize inline accent text colors used on homepage (orange/blue/etc) */
.masamune-theme .entry-content [style*="color:#ea580c"],
.masamune-theme .entry-content [style*="color: #ea580c"],
.masamune-theme .entry-content [style*="color:#2563eb"],
.masamune-theme .entry-content [style*="color: #2563eb"],
.masamune-theme .entry-content [style*="color:#16a34a"],
.masamune-theme .entry-content [style*="color: #16a34a"],
.masamune-theme .entry-content [style*="color:#9333ea"],
.masamune-theme .entry-content [style*="color: #9333ea"],
.masamune-theme .entry-content [style*="color:#7c3aed"],
.masamune-theme .entry-content [style*="color: #7c3aed"] {
  /* enforce no rainbow: text stays ink */
  color: var(--color-ink) !important;
}

/* Neutralize inline "border-left" rainbow stats accents */
.masamune-theme .entry-content [style*="border-left:4px solid #2563eb"],
.masamune-theme .entry-content [style*="border-left: 4px solid #2563eb"],
.masamune-theme .entry-content [style*="border-left:4px solid #16a34a"],
.masamune-theme .entry-content [style*="border-left: 4px solid #16a34a"],
.masamune-theme .entry-content [style*="border-left:4px solid #ea580c"],
.masamune-theme .entry-content [style*="border-left: 4px solid #ea580c"],
.masamune-theme .entry-content [style*="border-left:4px solid #9333ea"],
.masamune-theme .entry-content [style*="border-left: 4px solid #9333ea"] {
  /* allow a single accent (blue) via alpha */
  border-left-color: rgba(11, 92, 171, 0.35) !important;
}

body.home.wp-singular.page .wp-block-buttons {
  gap: 14px !important;
  margin-top: 1.75rem !important;
}

body.home.wp-singular.page .wp-block-button__link {
  /* OpenText-like: not too pill-shaped */
  border-radius: 12px !important;
  padding: 14px 34px !important;
  font-size: 1.05rem !important;
  line-height: 1.1 !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.12) !important;
}

body.home.wp-singular.page .wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.16) !important;
}

body.home.wp-singular.page .stats-section,
body.home.wp-singular.page .products-section {
  background: var(--color-bg-light) !important;
}

body.home.wp-singular.page .stats-section > .wp-block-group__inner-container,
body.home.wp-singular.page .products-section > .wp-block-group__inner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

body.home.wp-singular.page .stats-section .wp-block-column {
  border-left-width: 6px !important;
}

body.home.wp-singular.page .products-section .wp-block-column {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: var(--shadow-md) !important;
}

body.home.wp-singular.page .products-section .wp-block-column a {
  border-radius: 9999px !important;
  font-weight: 600;
}

body.home.wp-singular.page .cta-section {
  border-radius: 18px;
  overflow: hidden;
}

/* JP top: gradient headers (products cards + CTA) need extra contrast */
.masamune-theme .entry-content .products-section [style*="background:linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content .products-section [style*="background: linear-gradient"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content .cta-section :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* Desktop: keep hero centered (readability + JP top request) */
@media (min-width: 1024px) {
  body.home.wp-singular.page .hero-section {
    text-align: center !important;
  }
  body.home.wp-singular.page .hero-section .badge,
  body.home.wp-singular.page .hero-section h1.wp-block-heading,
  body.home.wp-singular.page .hero-section p.has-text-align-center {
    text-align: center !important;
  }
  body.home.wp-singular.page .wp-block-buttons {
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  body.home.wp-singular.page .wp-block-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.home.wp-singular.page .wp-block-button {
    width: 100%;
  }
  body.home.wp-singular.page .wp-block-button__link {
    width: 100% !important;
  }
}

/* ==========================================
   GLOBAL polish (OpenText-like)
   - Keep it subtle, avoid breaking other pages.
========================================== */
/* (moved to top as site-wide layout/header rules) */

/* ==========================================
   PAGE CONTENT (unboxed pages) - tighten to enterprise layout
========================================== */
.masamune-theme .entry-content.single-content > *:first-child {
  margin-top: 0;
}

.masamune-theme .entry-content.single-content > .wp-block-group,
.masamune-theme .entry-content.single-content > section {
  padding-top: clamp(44px, 5vw, 72px);
  padding-bottom: clamp(44px, 5vw, 72px);
}

.masamune-theme .entry-content.single-content > .wp-block-group > .wp-block-group__inner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ==========================================
   PRICING (page-id-13904) - override heavy inline styles
========================================== */
body.page-id-13904 .entry-content h1,
body.page-id-13904 .entry-content h2,
body.page-id-13904 .entry-content h3 {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

body.page-id-13904 .entry-content h1[style*="font-size"] {
  font-size: clamp(2.0rem, 3.8vw, 3.0rem) !important;
}

body.page-id-13904 .entry-content table {
  border: 1px solid rgba(15, 23, 42, 0.10);
}

/* ==========================================
   COMPARE (page-id-13906/13907)
========================================== */
body.page-id-13906 .entry-content h1[style*="font-size"],
body.page-id-13907 .entry-content h1[style*="font-size"] {
  font-size: clamp(2.0rem, 3.6vw, 2.8rem) !important;
}

body.page-id-13906 .entry-content table,
body.page-id-13907 .entry-content table {
  border: 1px solid rgba(15, 23, 42, 0.10);
}

/* Force dark text for small colored boxes on compare page */
/* 処理時間: background: #eff6ff */
.masamune-theme .entry-content div[style*="background: #eff6ff"],
.masamune-theme .entry-content div[style*="background:#eff6ff"],
.masamune-theme .entry-content div[style*="background: #EFF6FF"],
.masamune-theme .entry-content div[style*="background:#EFF6FF"] {
    background-color: #1e3a8a !important; /* Dark Blue */
    color: #ffffff !important;
}
.masamune-theme .entry-content div[style*="background: #eff6ff"] span,
.masamune-theme .entry-content div[style*="background:#eff6ff"] span,
.masamune-theme .entry-content div[style*="background: #EFF6FF"] span,
.masamune-theme .entry-content div[style*="background:#EFF6FF"] span {
    color: #ffffff !important;
}

/* 人的ミス: background: #f0fdf4 */
.masamune-theme .entry-content div[style*="background: #f0fdf4"],
.masamune-theme .entry-content div[style*="background:#f0fdf4"],
.masamune-theme .entry-content div[style*="background: #F0FDF4"],
.masamune-theme .entry-content div[style*="background:#F0FDF4"] {
    background-color: #14532d !important; /* Dark Green */
    color: #ffffff !important;
}
.masamune-theme .entry-content div[style*="background: #f0fdf4"] span,
.masamune-theme .entry-content div[style*="background:#f0fdf4"] span,
.masamune-theme .entry-content div[style*="background: #F0FDF4"] span,
.masamune-theme .entry-content div[style*="background:#F0FDF4"] span {
    color: #ffffff !important;
}

/* 作業負荷: background: #faf5ff */
.masamune-theme .entry-content div[style*="background: #faf5ff"],
.masamune-theme .entry-content div[style*="background:#faf5ff"],
.masamune-theme .entry-content div[style*="background: #FAF5FF"],
.masamune-theme .entry-content div[style*="background:#FAF5FF"] {
    background-color: #581c87 !important; /* Dark Purple */
    color: #ffffff !important;
}
.masamune-theme .entry-content div[style*="background: #faf5ff"] span,
.masamune-theme .entry-content div[style*="background:#faf5ff"] span,
.masamune-theme .entry-content div[style*="background: #FAF5FF"] span,
.masamune-theme .entry-content div[style*="background:#FAF5FF"] span {
    color: #ffffff !important;
}

/* Main card "業務効率大幅向上" container border */
.masamune-theme .entry-content div[style*="background: white"][style*="box-shadow"],
.masamune-theme .entry-content div[style*="background:white"][style*="box-shadow"],
.masamune-theme .entry-content div[style*="background: white"][style*="box-shadow"],
.masamune-theme .entry-content div[style*="background:white"][style*="box-shadow"] {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* ==========================================================================
   SPECIFIC FIXES FOR COMPARE PAGE (ID 13906/13907) - URGENT OVERRIDES
   ========================================================================== */

/* Center Alignment for Compare Page Headings */
body.page-id-13906 .entry-content h2,
body.page-id-13907 .entry-content h2,
body.page-id-13906 .entry-content h3,
body.page-id-13907 .entry-content h3 {
    text-align: center !important;
}

/* 1. Main White Card Text Visibility */
/* Target: The card with "業務効率大幅向上" inside the gradient section */
body.page-id-13906 .entry-content div[style*="background"][style*="box-shadow"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
body.page-id-13907 .entry-content div[style*="background"][style*="box-shadow"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
    color: var(--color-ink) !important;
    text-shadow: none !important;
}

/* 2. Small Feature Boxes Visibility */
/* Target: "処理時間", "人的ミス", "作業負荷" boxes */
/* We already have rules above, but let's reinforce them with page-ID scope just in case */
body.page-id-13906 .entry-content div[style*="eff6ff"],
body.page-id-13907 .entry-content div[style*="eff6ff"],
body.page-id-13906 .entry-content div[style*="EFF6FF"],
body.page-id-13907 .entry-content div[style*="EFF6FF"] {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
}
body.page-id-13906 .entry-content div[style*="eff6ff"] span,
body.page-id-13907 .entry-content div[style*="eff6ff"] span {
    color: #ffffff !important;
}

body.page-id-13906 .entry-content div[style*="f0fdf4"],
body.page-id-13907 .entry-content div[style*="f0fdf4"],
body.page-id-13906 .entry-content div[style*="F0FDF4"],
body.page-id-13907 .entry-content div[style*="F0FDF4"] {
    background-color: #14532d !important;
    color: #ffffff !important;
}
body.page-id-13906 .entry-content div[style*="f0fdf4"] span,
body.page-id-13907 .entry-content div[style*="f0fdf4"] span {
    color: #ffffff !important;
}

body.page-id-13906 .entry-content div[style*="faf5ff"],
body.page-id-13907 .entry-content div[style*="faf5ff"],
body.page-id-13906 .entry-content div[style*="FAF5FF"],
body.page-id-13907 .entry-content div[style*="FAF5FF"] {
    background-color: #581c87 !important;
    color: #ffffff !important;
}
body.page-id-13906 .entry-content div[style*="faf5ff"] span,
body.page-id-13907 .entry-content div[style*="faf5ff"] span {
    color: #ffffff !important;
}

/* ==========================================
   BLOG archive - make cards look enterprise
========================================== */
body.archive .content-wrap article,
body.blog .content-wrap article {
  background: var(--color-bg-white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ==========================================
   COLOR GUARDRAILS (No Pastel)
   - Many pages contain inline styles (background: #eff6ff etc).
   - We "ban" pastel panels by normalizing them to our neutral surface.
   - Keep semantic feedback (success/error) via borders, not pastel fills.
========================================== */

/* Normalize common pastel panel backgrounds -> neutral surface */
/* NOTE: We specifically override compare page boxes ABOVE, so these generic rules
   should come AFTER or rely on specific selectors if they conflict.
   However, the above compare rules use very specific attribute selectors, so they should win.
   Let's keep these generic rules for other pages. */
.masamune-theme .entry-content [style*="background:#dcfce7"],
.masamune-theme .entry-content [style*="background: #dcfce7"],
.masamune-theme .entry-content [style*="background:#d1fae5"],
.masamune-theme .entry-content [style*="background: #d1fae5"],
.masamune-theme .entry-content [style*="background:#fef2f2"],
.masamune-theme .entry-content [style*="background: #fef2f2"],
.masamune-theme .entry-content [style*="background:#fee2e2"],
.masamune-theme .entry-content [style*="background: #fee2e2"],
/* .masamune-theme .entry-content [style*="background:#eff6ff"],  <-- Commented out to let compare page specific rules win */
/* .masamune-theme .entry-content [style*="background: #eff6ff"], */
/* .masamune-theme .entry-content [style*="background:#f0fdf4"], */
/* .masamune-theme .entry-content [style*="background: #f0fdf4"], */
/* .masamune-theme .entry-content [style*="background:#faf5ff"], */
/* .masamune-theme .entry-content [style*="background: #faf5ff"] */
.masamune-theme .entry-content [style*="background:#fff7ed"],
.masamune-theme .entry-content [style*="background: #fff7ed"] {
  background: var(--color-bg-light) !important;
}

/* Replace pastel "icon circles" with clean outline rings */
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background:#fecaca"],
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background: #fecaca"] {
  background: transparent !important;
  border: 2px solid #DC2626 !important;
}
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background:#bbf7d0"],
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background: #bbf7d0"] {
  background: transparent !important;
  border: 2px solid #16A34A !important;
}
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background:#bfdbfe"],
.masamune-theme .entry-content [style*="border-radius: 50%"][style*="background: #bfdbfe"] {
  background: transparent !important;
  border: 2px solid var(--color-primary) !important;
}

/* Contact form flash messages: remove pastel fill, keep clear borders */
.masamune-theme .form-message.success {
  background: rgba(11, 92, 171, 0.06) !important;
  border: 1px solid rgba(11, 92, 171, 0.25) !important;
  color: var(--color-text-dark) !important;
}
.masamune-theme .form-message.error {
  background: rgba(220, 38, 38, 0.06) !important;
  border: 1px solid rgba(220, 38, 38, 0.25) !important;
  color: var(--color-text-dark) !important;
}

/* ==========================================
   READABILITY GUARDRAILS (No White-on-White)
   - If any block ends up with white text on light background, force it back to ink.
   - Allow white text ONLY inside known dark surfaces (cta/gradients/footer/dark-section).
========================================== */

/* Default: white text is not allowed in content unless it's a button */
.masamune-theme .entry-content [style*="color:#fff"]:not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn),
.masamune-theme .entry-content [style*="color: #fff"]:not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn),
.masamune-theme .entry-content [style*="color:#ffffff"]:not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn),
.masamune-theme .entry-content [style*="color: #ffffff"]:not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn),
.masamune-theme .entry-content .has-white-color:not(.wp-block-button__link):not(.wp-element-button):not(.submit-btn) {
  color: var(--color-ink) !important;
}

/* Re-allow white text inside dark surfaces */
.masamune-theme .cta-section [style*="color:#fff"],
.masamune-theme .cta-section [style*="color:#ffffff"],
.masamune-theme .cta-section .has-white-color,
.masamune-theme .dark-section [style*="color:#fff"],
.masamune-theme .bg-dark [style*="color:#fff"],
.masamune-theme .site-footer [style*="color:#fff"],
.masamune-theme .entry-content [style*="background:linear-gradient"] [style*="color:#fff"],
.masamune-theme .entry-content [style*="background:linear-gradient"] [style*="color:#ffffff"] {
  color: #fff !important;
}

/* [NEW] LIGHT SURFACE EXCEPTIONS (Pastel colors & Light Gradients) */
/* Force dark text on known light backgrounds, overriding parent gradient rules */
.masamune-theme .entry-content [style*="#fef2f2"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#FEF2F2"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#fee2e2"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#FEE2E2"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#fff7ed"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#FFF7ED"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#f0fdf4"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#F0FDF4"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#dcfce7"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#DCFCE7"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#eff6ff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#EFF6FF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#dbeafe"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#DBEAFE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#faf5ff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#FAF5FF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#fecaca"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#FECACA"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#bbf7d0"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#BBF7D0"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#bfdbfe"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#BFDBFE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
/* MOVED FROM DARK LIST: Orange/Amber colors are light, need dark text */
.masamune-theme .entry-content [style*="#f59e0b"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="#fb923c"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: var(--color-ink) !important;
  text-shadow: none !important;
}

/* [NEW] RESCUE: If a container is EXPLICITLY white, children should be dark 
   (Overrides parent gradient force-white rules) */
.masamune-theme .entry-content [style*="background:white"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: white"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:WHITE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: WHITE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#fff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: #fff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#FFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: #FFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:white"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: white"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:WHITE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: WHITE"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:#fff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: #fff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:#FFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: #FFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#ffffff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: #ffffff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background:#FFFFFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background: #FFFFFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:#ffffff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: #ffffff"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color:#FFFFFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .entry-content [style*="background-color: #FFFFFF"] :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: var(--color-ink) !important;
  text-shadow: none !important;
}

/* Safety: Restore text color inheritance inside buttons */
.masamune-theme .wp-block-button__link :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small),
.masamune-theme .wp-element-button :is(h1,h2,h3,h4,h5,h6,p,li,span,strong,em,small) {
  color: inherit !important;
  text-shadow: inherit !important;
}

/* ==========================================================================
   PRICING CARD ICON VISIBILITY (Gradient Cards)
   ========================================================================== */
/* Icons inside dark/gradient pricing cards need specific styling to be visible.
   Otherwise they inherit "force white" text but keep their light/transparent background, which looks bad. */
.masamune-theme .entry-content [style*="background:linear-gradient"] .masamune-icon,
.masamune-theme .entry-content [style*="background: linear-gradient"] .masamune-icon {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}
