/* Shared H2/H3/H4 heading styles. SWELL callout styles remain theme-owned. */
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"]) {
  position:relative!important;display:block!important;overflow-wrap:anywhere;
  margin:2em 0 1.1em!important;padding:15px 18px 15px 78px!important;
  line-height:1.65!important;color:#fff!important;
  background:linear-gradient(115deg,#123d55,#234e67)!important;
  border:1px solid #d5b77b!important;border-radius:4px!important;
  box-shadow:0 2px 0 rgba(16,47,69,.12)!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"])::before {
  content:""!important;position:absolute!important;display:block!important;
  left:20px!important;top:calc(50% - 9px)!important;width:17px!important;height:17px!important;
  background:radial-gradient(circle,#e0c486 0 25%,transparent 28%)!important;
  border:2px solid #e0c486!important;transform:rotate(45deg)!important;
  border-radius:1px!important;box-shadow:none!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"])::after {
  content:""!important;position:absolute!important;display:block!important;
  left:58px!important;top:calc(50% - 16px)!important;width:2px!important;height:32px!important;
  background:#d5b77b!important;border:0!important;transform:none!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h3.wp-block-heading:not([class*="is-style-"]) {
  position:relative!important;display:block!important;margin:1.65em 0 .85em!important;
  padding:.66em .75em .68em 3.05em!important;line-height:1.55!important;overflow-wrap:anywhere;
  color:#173f55!important;background:linear-gradient(100deg,#e5f0f5,#f7fafb)!important;
  border:0!important;border-left:3px solid #35728b!important;border-bottom:1px solid #c9ad75!important;
  border-radius:1px!important;box-shadow:none!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h3.wp-block-heading:not([class*="is-style-"])::before {
  content:""!important;display:block!important;position:absolute!important;
  left:1.05em!important;top:calc(50% - 5px)!important;width:10px!important;height:10px!important;
  background:#c7a66b!important;border:1px solid #af8d4a!important;transform:rotate(45deg)!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h3.wp-block-heading:not([class*="is-style-"])::after {
  content:""!important;display:block!important;position:absolute!important;
  left:2.3em!important;top:calc(50% - 12px)!important;width:1px!important;height:24px!important;
  background:#b5965e!important;transform:none!important;border:0!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h4.wp-block-heading:not([class*="is-style-"]) {
  position:relative!important;display:block!important;margin:1.25em 0 .7em!important;
  padding:.3em .1em .35em 1.25em!important;line-height:1.55!important;
  color:#24465c!important;background:transparent!important;box-shadow:none!important;
  border:0!important;border-bottom:1px solid #d2bd91!important;border-radius:0!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h4.wp-block-heading:not([class*="is-style-"])::before {
  content:""!important;display:block!important;position:absolute!important;
  left:.25em!important;top:calc(50% - 3.5px)!important;width:7px!important;height:7px!important;
  background:#c69a51!important;border:0!important;transform:none!important;border-radius:1px!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h4.wp-block-heading:not([class*="is-style-"])::after {content:none!important;display:none!important}
/* Native lists: preserve proper ul/ol semantics, list markers, nested depth and SWELL list variants. */
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) :is(ul.wp-block-list,ol.wp-block-list):not([class*="is-style-"]) {
  margin:1.4em 0 1.65em!important;padding-left:1.9em!important;
  line-height:1.8!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) :is(ul.wp-block-list,ol.wp-block-list):not([class*="is-style-"]) > li {
  margin:.38em 0!important;padding-left:.15em!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) :is(ul.wp-block-list,ol.wp-block-list):not([class*="is-style-"]) > li::marker {
  color:#bc975c!important;font-weight:700!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) :is(ul.wp-block-list,ol.wp-block-list):not([class*="is-style-"]) :is(ul,ol) {
  margin:.35em 0 .55em!important;padding-left:1.45em!important;
}
/* Gutenberg tables and SWELL theme regular tables. Preserve styles explicitly requested. */
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) {
  max-width:100%;margin:1.6em 0 2em!important;overflow-x:auto;
  border:1px solid #d9e5eb!important;border-radius:12px!important;background:#fff!important;
  box-shadow:0 3px 14px rgba(19,48,62,.06)!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) table {
  border-collapse:separate!important;border-spacing:0!important;margin:0!important;width:100%!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) :is(th,td) {
  padding:.85em 1em!important;line-height:1.65!important;vertical-align:middle!important;
  border:0!important;border-bottom:1px solid #e5edf1!important;
  color:#24495a!important;overflow-wrap:anywhere!important;
}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) tbody tr:nth-child(even) {background:#f7fafb!important}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) tr:last-child :is(th,td) {border-bottom:0!important}
:is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) thead th {background:#e6f1f4!important;color:#234b58!important}
/* Generic SWELL callout variants remain owned by SWELL; TES legacy classes above are aliases. */
@media(max-width:640px) {
  :is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"]) {padding:11px 12px 11px 62px!important;font-size:1.15em!important}
  :is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"])::before {left:14px!important;width:13px!important;height:13px!important;top:calc(50% - 7px)!important}
  :is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) h2.wp-block-heading:not([class*="is-style-"])::after {left:43px!important;height:27px!important;top:calc(50% - 13px)!important}
  :is(.post_content,.entry-content,.wp-block-post-content,.editor-styles-wrapper) figure.wp-block-table:not([class*="is-style-"]):not(.tes-table) :is(th,td) {padding:.7em .65em!important;font-size:.9em!important}
}

/* SWELL shared editorial design v1.0.7.
   Used only on SWELL sites, public post body and Gutenberg article canvas.
   TES class aliases preserve existing Terekurashi posts after migrating their CSS.
   Existing Gutenberg is-style-* headings are left to theme/plugin-specific styles. */
:where(.entry-content,.post_content,.wp-block-post-content,.editor-styles-wrapper) h2.tes-heading--2,
h2.wp-block-heading.tes-heading--2 {
  box-sizing:border-box;position:relative;display:block;overflow-wrap:anywhere;
  margin:2em 0 1.1em!important;padding:15px 18px 15px 78px!important;
  line-height:1.65!important;color:#fff!important;background:linear-gradient(115deg,#123d55,#234e67)!important;
  border:1px solid #d5b77b!important;border-radius:4px!important;
  box-shadow:0 2px 0 rgba(16,47,69,.12)!important;
}
h2.wp-block-heading.tes-heading--2::before {content:""!important;position:absolute!important;display:block!important;
 left:20px!important;top:calc(50% - 9px)!important;width:17px!important;height:17px!important;
 background:radial-gradient(circle,#e0c486 0 25%,transparent 28%)!important;
 border:2px solid #e0c486!important;transform:rotate(45deg)!important;border-radius:1px!important;box-shadow:none!important;
}
h2.wp-block-heading.tes-heading--2::after {content:""!important;position:absolute!important;display:block!important;
 left:58px!important;top:calc(50% - 16px)!important;width:2px!important;height:32px!important;
 background:#d5b77b!important;border:0!important;transform:none!important;
}
:where(.entry-content,.post_content,.wp-block-post-content,.editor-styles-wrapper) h3.tes-heading--3,
h3.wp-block-heading.tes-heading--3 {
 position:relative!important;display:block!important;margin:1.65em 0 .85em!important;
 padding:.66em .75em .68em 3.05em!important;line-height:1.55!important;overflow-wrap:anywhere;
 color:#173f55!important;background:linear-gradient(100deg,#e5f0f5,#f7fafb)!important;
 border:0!important;border-left:3px solid #35728b!important;border-bottom:1px solid #c9ad75!important;
 border-radius:1px!important;box-shadow:none!important;
}
h3.wp-block-heading.tes-heading--3::before {content:""!important;display:block!important;position:absolute!important;
 left:1.05em!important;top:calc(50% - 5px)!important;width:10px!important;height:10px!important;
 background:#c7a66b!important;border:1px solid #af8d4a!important;transform:rotate(45deg)!important;
}
h3.wp-block-heading.tes-heading--3::after {content:""!important;display:block!important;position:absolute!important;
 left:2.3em!important;top:calc(50% - 12px)!important;width:1px!important;height:24px!important;
 background:#b5965e!important;transform:none!important;border:0!important;
}
:where(.entry-content,.post_content,.wp-block-post-content,.editor-styles-wrapper) h4.tes-heading--4,
h4.wp-block-heading.tes-heading--4 {
 position:relative!important;display:block!important;margin:1.25em 0 .7em!important;padding:.3em .1em .35em 1.25em!important;
 line-height:1.55!important;color:#24465c!important;background:transparent!important;box-shadow:none!important;
 border:0!important;border-bottom:1px solid #d2bd91!important;border-radius:0!important;
}
h4.wp-block-heading.tes-heading--4::before {content:""!important;display:block!important;position:absolute!important;
 left:.25em!important;top:calc(50% - 3.5px)!important;width:7px!important;height:7px!important;
 background:#c69a51!important;border:0!important;transform:none!important;border-radius:1px!important;
}
h4.wp-block-heading.tes-heading--4::after {content:none!important;display:none!important}
/* Information/comparison tables: only ones explicitly authored by TES. */
figure.wp-block-table.tes-table {margin:1.6em 0 2em!important;max-width:100%;overflow-x:auto;
 border:1px solid #d9e5eb!important;border-radius:12px!important;background:#fff!important;
 box-shadow:0 3px 14px rgba(19,48,62,.06)!important;
}
figure.wp-block-table.tes-table table {width:100%!important;min-width:0;border-collapse:separate!important;border-spacing:0!important;table-layout:auto!important;margin:0!important;}
figure.wp-block-table.tes-table td,figure.wp-block-table.tes-table th {padding:.85em 1em!important;line-height:1.65!important;vertical-align:middle!important;
 border:0!important;border-bottom:1px solid #e5edf1!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:.94em!important;color:#24495a!important;
}
figure.wp-block-table.tes-table tr:last-child td {border-bottom:0!important}
figure.wp-block-table.tes-table--info tbody tr td:first-child {width:32%;background:#edf4f7!important;font-weight:700!important;border-right:1px solid #e5edf1!important}
figure.wp-block-table.tes-table--info tbody tr:nth-child(even) td:not(:first-child) {background:#f8fbfc!important}
figure.wp-block-table.tes-table--compare thead th {background:#e6f1f4!important;color:#234b58!important;font-weight:750!important;text-align:left!important;border-bottom:2px solid #b7d2df!important}
figure.wp-block-table.tes-table--compare tbody tr:nth-child(even) {background:#f7fafb!important}
figure.wp-block-table.tes-table figcaption {font-size:.86em!important;color:#506a75!important;text-align:left;padding:.75em 1em!important;background:#f8fafb!important}
/* SWELL owns callout/notice styles, including legacy .tes-callout blocks.
   No shared-plugin background, border or spacing override for normal callouts. */
mark.tes-highlight {background:linear-gradient(transparent 55%,#f5d8a0 55%)!important;color:inherit!important;padding:0 .06em}

@media(max-width:640px) {
 h2.wp-block-heading.tes-heading--2 {padding:11px 12px 11px 62px!important;font-size:1.15em!important}
 h2.wp-block-heading.tes-heading--2::before {left:14px!important;width:13px!important;height:13px!important;top:calc(50% - 7px)!important}
 h2.wp-block-heading.tes-heading--2::after {left:43px!important;height:27px!important;top:calc(50% - 13px)!important}
 figure.wp-block-table.tes-table--compare table {min-width:430px!important}
 figure.wp-block-table.tes-table td,figure.wp-block-table.tes-table th {padding:.7em .65em!important;font-size:.9em!important}
}

/* Shared product-box appearance v1.0.9, strictly requiring a card child.
   SWELL standard callouts, notes and lists must not inherit commerce card styles.
   Shared product-box appearance for all SWELL blogs.
   Supports legacy TES markup and new SSI classes; CSS never adds prices, images or links.
   Product selection and link verification remain with each blog's article pipeline. */
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) {margin:1.65em 0 2em!important;max-width:100%}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-card, .tes-product-card) {box-sizing:border-box;position:relative;display:flex;gap:18px;align-items:center;overflow:hidden;
 padding:18px;border:1px solid rgba(100,116,139,.2);border-radius:22px;
 background:linear-gradient(135deg,#edf4ff,#e8efff 48%,#f2edff);
 box-shadow:0 14px 32px rgba(35,52,85,.1);}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-card, .tes-product-card)::before {content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(#3b82f6,#8b5cf6)}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-media, .tes-product-media) {display:flex;align-items:center;justify-content:center;flex:0 0 132px;width:132px;height:150px;box-sizing:border-box;
 padding:9px;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.08)}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-media, .tes-product-media)>a {width:100%;height:100%;display:flex;align-items:center;justify-content:center}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-media, .tes-product-media) img {max-width:100%!important;max-height:100%!important;object-fit:contain!important;width:100%;height:100%}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-image-placeholder, .tes-product-image-placeholder) {font-size:12px;color:#64748b;text-align:center}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-main, .tes-product-main) {flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-title, .tes-product-title) {font-size:1.08em!important;font-weight:800!important;line-height:1.6!important;color:#253047!important;margin:0!important}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-description, .tes-product-description) {font-size:.92em!important;color:#516579!important;margin:0!important}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-actions, .tes-product-actions) {display:flex;flex-wrap:wrap;gap:9px}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) a:is(.ssi-buy-button, .tes-buy-button) {display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box;
 padding:10px 15px;border-radius:11px;background:#1d4f66;color:#fff!important;text-decoration:none!important;
 font-size:.9em;font-weight:700;line-height:1.45;box-shadow:0 5px 12px rgba(15,23,42,.1)}
:is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) a:is(.ssi-buy-button, .tes-buy-button):hover {background:#123d55;color:#fff!important}
@media(max-width:640px) {
 :is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-card, .tes-product-card) {gap:12px;padding:13px}
 :is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) :is(.ssi-product-media, .tes-product-media) {flex-basis:95px;width:95px;height:120px}
 :is(.ssi-product-box:has(> .ssi-product-card), .tes-product-box:has(> .tes-product-card)) a:is(.ssi-buy-button, .tes-buy-button) {padding:9px 11px;font-size:.81em}
}
