/* =========================================================================
   CapsisMedia — single consolidated stylesheet (token-driven).
   Replaces public/capsis2010.css + public/capsis-responsive.css.
   Colors and fonts come from the design tokens in src/index.css.
   Structural layout for the 2010 table-based markup + responsive layer.
   ========================================================================= */

/* Source Sans 3 — humanist sans continuing the 2010 Tahoma/Arial tone.
   Self-hosted; latin + latin-ext for Swedish legal copy. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Base / layout helpers (folded from the 2010 sheet, tokenised) ---- */
html { overflow-x: hidden; }

body {
  background: hsl(var(--background));
  background-image: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sep_1 {
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/495080b3df520e0c808bf2f8f2784e36_cm__images__capsismedia_2010_31.jpg);
  background-repeat: repeat-x;
  background-position: left top;
}
.sep_2 {
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/baf3a0b3538b0d28785983ec2c4d931c_cm__images__capsismedia_2010_34.jpg);
  background-repeat: repeat-x;
  background-position: left top;
}

.header_text {
  line-height: var(--leading-body);
  font-size: var(--text-body);
  color: hsl(var(--foreground));
}

.footer_txt {
  padding-bottom: 10px;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: 1.6;
}

.white_text { color: #fff; }
.white_text a, .white_text a:visited { color: #fff; }
.white_text a:hover { color: #fff; }

.left { float: left; }
.clear { height: 1px; clear: both; }
.left_bx_brdr { border: 1px solid hsl(var(--brand-border)); }

/* Sidebar "Need help after launch?" box */
.cm-side-help { padding: 16px 18px; }
.cm-side-help strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: hsl(var(--brand-deep));
  margin: 0 0 8px;
  line-height: var(--leading-snug);
}
.cm-side-help p {
  margin: 0;
  font-size: var(--text-small);
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}
.cm-side-help a { color: hsl(var(--link)); }
.cm-side-help a:hover { color: hsl(var(--link-hover)); }

/* Inner page header classes are div-based now; the legacy hero bg class is unused. */

/* ---- Site shell ---- */
.cm-site-page { background: hsl(var(--surface)); }

.cm-wrap { width: 940px; margin: 0 auto; }
.cm-header-gap { height: 16px; }
.cm-vgap-8 { height: 8px; line-height: 8px; font-size: 8px; }

.cm-mec-line {
  text-align: center;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin: 8px 12px 16px;
  line-height: 1.5;
}

.cm-mobile-header { display: none; }
.cm-desktop-header { width: 100%; }

/* Keep 2010 spacer GIFs / nav bitmaps from being crushed by preflight */
.cm-site-page img[src*="spacer.gif"],
.cm-blog-page img[src*="spacer.gif"] {
  max-width: none !important;
  width: unset !important;
  height: unset !important;
}

/* Homepage hero: exact 2010 pair, no crop, radius, or gap */
.cm-hero-2010 img.cm-hero-collage,
.cm-hero-2010 img.cm-hero-banner {
  border-radius: 0;
  box-shadow: none;
  display: block;
}

/* ---- Buttons (design system) ---- */
.cm-btn,
.cm-buy-btn {
  display: inline-block;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  font: 700 var(--text-small)/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease;
}
.cm-btn:hover,
.cm-buy-btn:hover {
  background: hsl(var(--primary-hover));
  color: #fff !important;
  text-decoration: none;
}
.cm-btn:disabled,
.cm-buy-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- Form controls ---- */
.cm-input,
.cm-site-page input[type="text"],
.cm-site-page input[type="email"],
.cm-site-page input[type="password"],
.cm-site-page input[type="tel"],
.cm-site-page textarea,
.cm-site-page select {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 9px 11px;
  font: var(--text-body)/1.5 var(--font-body);
  color: hsl(var(--foreground));
}
.cm-input:focus {
  outline: 2px solid hsl(var(--primary-hover));
  outline-offset: 1px;
  border-color: hsl(var(--primary-hover));
}
.cm-input::placeholder { color: hsl(var(--muted-foreground)); }

/* ---- Blog 2010 chrome ---- */
.cm-blog-page {
  background-color: hsl(var(--background));
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/b33709ee4b2c567c27e9f582d820801b_cm__theme__page-bg.png);
  background-repeat: repeat-y;
  background-position: center top;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: hsl(var(--foreground));
  min-height: 100vh;
}
.cm-blog-page .header-bg {
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/a559699f8f6156b12e4b557d285e90f8_cm__theme__bg_top.png);
  background-position: center top;
  background-repeat: no-repeat;
}
.cm-blog-page .footer-bg {
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/d2257b53f06ec2fdd3827e1e33fbb48a_cm__theme__bg-bottom.png);
  background-position: center bottom;
  background-repeat: no-repeat;
}
.cm-blog-page a, .cm-blog-page a:visited { color: hsl(var(--link)); text-decoration: none; }
.cm-blog-page a:hover { color: hsl(var(--link-hover)); text-decoration: underline; }
.cm-blog-page .header-topa {
  color: hsl(var(--brand-deep)) !important;
  text-decoration: none !important;
  display: block;
  font-family: var(--font-body);
  font-size: 20px;
  margin-right: 20px;
  margin-left: 10px;
  letter-spacing: 1px;
}
.cm-blog-page .header-topa:hover { color: hsl(var(--primary-hover)) !important; }
.cm-blog-page .footer-title,
.cm-blog-page .footer-title a { font-size: 11px; color: hsl(var(--brand-deep)); }
.cm-blog-page h2 { font-size: var(--text-h2); color: hsl(var(--foreground)); font-weight: 600; margin: 0 0 0.6em; font-family: var(--font-heading); }
.cm-blog-page .left_bg {
  background-image: url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/9bbc47189ef40673c4b662a9d5c3d144_cm__theme__left_bg.jpg);
  background-repeat: no-repeat;
  background-position: left top;
  width: 246px;
}
.cm-blog-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 8px 24px;
  align-items: start;
}
.cm-blog-sidebar { padding: 12px 8px 16px 12px; }
.cm-blog-sidebar img { max-width: 100%; height: auto; }
.cm-blog-sidebar h2 { font-size: var(--text-h3); margin-top: 1em; }
.cm-blog-sidebar select {
  box-sizing: border-box;
  width: 100%;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 9px 11px;
  font: var(--text-body)/1.5 var(--font-body);
  color: hsl(var(--foreground));
}
.cm-blog-sidebar select:focus {
  outline: 2px solid hsl(var(--primary-hover));
  outline-offset: 1px;
  border-color: hsl(var(--primary-hover));
}
.cm-blog-main, .cm-blog-feed { min-width: 0; padding: 8px 16px 16px; }
.cm-blog-page .post { margin-bottom: 24px; }
.cm-blog-page .post h1 {
  font-size: var(--text-h1);
  color: hsl(var(--foreground));
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 0.5em;
  line-height: var(--leading-tight);
}
.cm-blog-page .post h2 { font-size: var(--text-h2); }
.cm-post-meta { color: hsl(var(--muted-foreground)); font-size: var(--text-meta); margin-bottom: 0.8em; }
.cm-text-link { color: hsl(var(--link)); }
.cm-pagetitle { font-size: var(--text-h1); }
.cm-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ---- CMS 2010 ---- */
.cm-cms-page {
  min-height: 100vh;
  background: hsl(var(--surface)) url(https://media.base44.com/images/public/6b0ccba56b241ce9e91961dc/7b32a3da66ec34c46b7ba75221a57d12_cm__manager__capsismedia_01.jpg) repeat-x left top;
  font-family: var(--font-body);
  color: hsl(var(--foreground));
}
.cm-cms-login-page { padding: 24px 16px 48px; text-align: center; }
.cm-cms-login { width: min(420px, 100%); margin: 0 auto; }
.cm-cms-login .cm-cms-brand img,
.cm-cms-brand img { max-width: 100%; height: auto; margin-inline: auto; }
.cm-cms-login-form,
.cm-login-form {
  text-align: left;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  padding: 20px;
  margin-top: 16px;
}
.cm-cms-shell { max-width: 1000px; margin: 0 auto; padding: 16px; }
.cm-cms-top {
  display: flex;
  align-items: center;
  gap: 12px;
  background: hsl(var(--surface));
  padding: 8px 10px;
}
.cm-cms-user { margin: 0 auto 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.cm-cms-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); background: hsl(var(--surface)); min-height: 50vh; }
.cm-cms-nav { background: hsl(var(--brand-deep)); color: #fff; padding: 12px 8px 24px; }
.cm-cms-nav-title { margin: 0 0 8px; font-weight: bold; font-size: 12px; }
.cm-cms-nav a,
.cm-cms-logout {
  display: block;
  width: 100%;
  text-align: left;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 6px 8px;
  font: 12px var(--font-body);
  cursor: pointer;
}
.cm-cms-nav a.active,
.cm-cms-nav a:hover,
.cm-cms-logout:hover { background: hsl(var(--primary-hover)); }
.cm-cms-main { padding: 16px; min-width: 0; overflow-x: auto; }
.cm-cms-foot { text-align: center; font-size: 11px; color: hsl(var(--muted-foreground)); padding: 12px 8px 32px; }
.cm-cms-main table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cm-cms-main th,
.cm-cms-main td { padding: 6px 8px; border-bottom: 1px solid hsl(var(--border)); text-align: left; vertical-align: top; }
.msg { color: hsl(var(--destructive)); font-weight: bold; }

/* ---- Hamburger (mobile/tablet) ---- */
.cm-hamburger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.cm-hamburger span { display: block; height: 2px; background: hsl(var(--foreground)); }
.cm-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: hsl(var(--surface));
  border-bottom: 1px solid hsl(var(--border));
}
.cm-mobile-logo img { display: block; height: 48px; width: auto; max-width: 180px; }

/* Text wordmark replacing the legacy blog logo image */
.cm-blog-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3rem;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  line-height: 1;
  color: hsl(var(--foreground));
  white-space: nowrap;
  display: inline-block;
}
.cm-blog-wordmark span { color: hsl(var(--primary)); }
.cm-mobile-logo .cm-blog-wordmark { font-size: 2rem; }
.cm-blog-logo-link { display: inline-block; padding: 18px 0; }
.cm-mobile-nav { display: grid; background: hsl(var(--surface)); border-bottom: 1px solid hsl(var(--border)); }
.cm-mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--accent));
  color: hsl(var(--link));
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
}
.cm-mobile-nav a:hover { color: hsl(var(--link-hover)); }

.cm-html img,
.cm-theme-grid img,
.cm-main-cell img,
.entry img { max-width: 100%; height: auto; }

/* ---- Page body & section rhythm ---- */
.cm-page-body { padding: 4px 8px 32px; }
.cm-page-body h2,
.cm-main-cell h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h2);
  color: hsl(var(--foreground));
  margin: 1.6em 0 0.6em;
}
.cm-page-body h2:first-child,
.cm-main-cell h2:first-child { margin-top: 0; }
.cm-page-body h3,
.cm-main-cell h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h3);
  color: hsl(var(--foreground));
  margin: 1.4em 0 0.5em;
}
.cm-page-body p,
.cm-main-cell p,
.cm-blog-intro p {
  margin: 0 0 1em;
  line-height: var(--leading-body);
}
.cm-page-body ul,
.cm-main-cell ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
  line-height: var(--leading-body);
}
.cm-blog-intro h1 { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h1); margin: 0 0 0.6em; }

/* Homepage 3-column block */
.cm-cols-3 h3 {
  margin: 1.1em 0 0.4em;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  font-weight: 600;
}
.cm-cols-3 p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}
.cm-home-section-title {
  margin: 1.4em 0 0.5em;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  font-weight: 600;
}

.cm-html p,
.cm-main-cell p,
.cm-hero-copy p,
.cm-cols-3 p,
.cm-inner-intro p {
  margin: 0 0 0.85em;
  line-height: var(--leading-body);
}

.cm-home-quote { padding: 18px 0; }
.cm-home-quote p { margin: 0; }
tr.cm-home-feat p { margin-bottom: 40px; }
.cm-home-readmore img { height: 43px; }

/* ---- Hero / inner hero placement ---- */
table.cm-hero-copy-table,
table.cm-inner-intro-table {
  border-collapse: separate;
  border-spacing: 4px;
}
td.cm-hero-copy { padding: 0 0 0 2px; vertical-align: top; }
td.cm-inner-intro { padding: 0; vertical-align: top; }
td.cm-inner-hero-left,
td.cm-inner-hero-right { padding: 0; vertical-align: top; }
.cm-inner-hero-left-inner { position: relative; display: block; }
td.cm-inner-hero-left img,
td.cm-inner-hero-right img,
img.cm-hero-collage,
img.cm-hero-banner {
  display: block;
  border-radius: 0;
  box-shadow: none;
  max-width: 100%;
  height: auto;
}
td.cm-inner-hero-left h1.cm-inner-title,
.cm-inner-hero-left-inner h1.cm-inner-title {
  position: absolute;
  left: 20px;
  right: 4px;
  top: 76.233%;
  margin: 0;
  padding: 4px 4px 0 0;
  text-indent: 0;
  font-size: 30px;
  line-height: var(--leading-tight);
  font-weight: 600;
  font-family: var(--font-heading);
  color: #000;
}

/* Inner page header: the left collage and the right (banner + intro) share
   one height so the header reads as one aligned block. The left collage image
   fills the full row height (cover, anchored top) so its bottom always aligns
   with the right column; the title stays pinned to its white band at 76.233%.
   The intro sits below the banner with no background.
   Desktop only — the <=599px grid layout handles its own stacking. */
@media (min-width: 600px) {
  table.cm-inner-header { min-height: 223px; }
  table.cm-inner-header > tbody > tr { height: 223px; }
  table.cm-inner-header td.cm-inner-hero-left { vertical-align: top; height: 100%; }
  .cm-inner-hero-left-inner { height: 100%; }
  table.cm-inner-header td.cm-inner-hero-left img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: top;
  }
  table.cm-inner-header td.cm-inner-hero-right > table { height: 100%; width: 100%; }
  table.cm-inner-header tr.cm-inner-copy-row > td {
    height: 100%;
    vertical-align: middle;
    padding: 10px 16px;
  }
  table.cm-inner-header tr.cm-inner-copy-row > td table.cm-inner-intro-table {
    border-spacing: 0;
    width: 100%;
  }
  table.cm-inner-header tr.cm-inner-copy-row > td td.cm-inner-intro { padding: 0; vertical-align: middle; }
  table.cm-inner-header tr.cm-inner-copy-row > td td.cm-inner-intro p:last-child { margin-bottom: 0; }
}

/* ---- Legal / sidebar helpers ---- */
.cm-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 14px;
}
.cm-sv-legal {
  margin-top: 28px;
  padding: 14px 18px;
  background: hsl(var(--muted));
  border-left: 4px solid hsl(var(--primary));
}
.cm-sv-legal h2 { font-size: var(--text-h3); margin: 0 0 0.5em; }
.cm-service-list { margin: 0 0 1em; padding-left: 1.25em; line-height: var(--leading-body); }

/* ---- Portfolio / banners ---- */
.cm-portfolio {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cm-portfolio img { display: block; width: 100%; height: auto; }
.cm-banner-samples { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.cm-banner-samples img { display: block; max-width: 100%; height: auto; }

/* ---- Order confirmation card ---- */
.cm-order-confirm {
  max-width: 40rem;
  padding: 20px 22px;
  border: 1px solid hsl(var(--brand-border));
  background: hsl(var(--surface));
}

/* ---- Focus rings ---- */
.cm-site-page a:focus-visible,
.cm-blog-page a:focus-visible,
.cm-site-page button:focus-visible,
.cm-blog-page button:focus-visible,
.cm-site-page input:focus-visible,
.cm-blog-page input:focus-visible,
.cm-site-page textarea:focus-visible,
.cm-blog-page textarea:focus-visible {
  outline: 2px solid hsl(var(--primary-hover));
  outline-offset: 2px;
}
.cm-site-page a.sr-only:focus,
.cm-blog-page a.sr-only:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  overflow: visible;
  padding: 8px 12px;
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
}

/* ---- Desktop: homepage columns breathing room ---- */
@media (min-width: 961px) {
  table.cm-cols-3 > tbody > tr > td:not([width="50"]) { padding: 0 22px; }
  table.cm-cols-3 > tbody > tr > td:first-child { padding-left: 0; }
  table.cm-cols-3 > tbody > tr > td:last-child { padding-right: 0; }
  tr.cm-home-readmore td { padding-top: 40px; }
}

/* ---- Responsive ---- */
@media (max-width: 959px) {
  .cm-wrap,
  .cm-footer-bar,
  .cm-blog-wrap,
  table.cm-footer-bar { width: auto !important; max-width: 100%; }
  .cm-wrap { padding: 0 10px; box-sizing: border-box; }
  .cm-desktop-header { display: none !important; }
  .cm-mobile-header { display: block; }
  .cm-blog-desktop-top { display: none !important; }
  .cm-blog-layout { display: flex; flex-direction: column; }
  .cm-blog-main { order: -1; }
  .cm-blog-sidebar,
  .cm-blog-page .left_bg { width: auto; background-image: none; }
  .cm-cms-layout { grid-template-columns: 1fr; }
  .cm-cms-nav { display: none; }
  .cm-cms-shell.is-open .cm-cms-nav,
  .cm-cms-page .cm-cms-layout .cm-cms-nav { display: none; }
  .cm-cms-shell.is-open .cm-cms-nav { display: block; }
  table.cm-with-side,
  table.cm-with-side > tbody { display: block; width: 100%; }
  table.cm-with-side > tbody > tr { display: flex; flex-direction: column; width: 100%; }
  table.cm-with-side td { display: block; width: 100% !important; }
  table.cm-with-side td.cm-side-gutter { display: none; }
  table.cm-with-side td.cm-main-cell { order: -1; }
  table.cm-cols-3 td[width="50"] { display: none; }
  td.cm-hero-collage-cell,
  td.cm-inner-hero-left { width: 40.106% !important; }
  td.cm-hero-collage-cell img,
  td.cm-hero-right img,
  td.cm-inner-hero-left img,
  td.cm-inner-hero-right img { max-width: 100%; height: auto; }
  .footer_bg { height: auto; background-repeat: repeat; }
  .cm-footer-bar,
  .cm-footer-bar tbody,
  .cm-footer-bar tr { display: block; width: 100% !important; }
  .cm-footer-bar td { display: block; width: auto !important; text-align: center !important; padding: 4px; }
  .cm-footer-bar img { display: none; }
}

@media (max-width: 599px) {
  body, .cm-site-page, .cm-site-page td, .cm-site-page th { font-size: 16px; }
  table.cm-hero-2010 { display: grid; grid-template-columns: 377fr 563fr; width: 100%; }
  table.cm-hero-2010 > tbody,
  table.cm-hero-2010 tr { display: contents; }
  td.cm-hero-collage-cell { grid-column: 1; grid-row: 1; width: auto !important; }
  td.cm-hero-right { display: contents; }
  img.cm-hero-banner { grid-column: 2; grid-row: 1; width: 100%; height: auto; }
  img.cm-hero-collage { width: 100%; height: auto; }
  table.cm-hero-copy-table { grid-column: 1 / -1; grid-row: 2; }
  table.cm-inner-header { display: grid; grid-template-columns: 377fr 563fr; width: 100%; }
  table.cm-inner-header > tbody,
  table.cm-inner-header tr,
  td.cm-inner-hero-left,
  td.cm-inner-hero-right,
  td.cm-inner-hero-right > table,
  td.cm-inner-hero-right > table > tbody,
  td.cm-inner-hero-right > table > tbody > tr,
  td.cm-inner-hero-right > table > tbody > tr > td,
  .cm-inner-hero-left-inner { display: contents; }
  td.cm-inner-hero-left img { grid-column: 1; grid-row: 1; width: 100%; height: auto; }
  td.cm-inner-hero-right img { grid-column: 2; grid-row: 1; width: 100%; height: auto; }
  td.cm-inner-hero-left h1.cm-inner-title,
  .cm-inner-hero-left-inner h1.cm-inner-title {
    position: static;
    left: auto; right: auto; top: auto; bottom: auto;
    grid-column: 1 / -1; grid-row: 2;
    padding: 8px 4px 0;
    font-size: 1.5rem;
  }
  table.cm-inner-intro-table,
  td.cm-inner-intro { grid-column: 1 / -1; grid-row: 3; }
  table.cm-inner-intro-table,
  table.cm-hero-copy-table { border-spacing: 4px; }
  td.cm-hero-copy,
  td.cm-inner-intro { padding: 4px 10px; }
  table.cm-cols-3,
  table.cm-cols-3 > tbody { display: block; width: 100%; }
  table.cm-cols-3 > tbody > tr { display: block; }
  table.cm-cols-3 td { display: block; width: 100% !important; }
  table.cm-cols-3 td[width="50"] { display: none; }
  .cm-theme-grid,
  .cm-theme-grid tbody,
  .cm-theme-grid tr { display: block; width: 100%; }
  .cm-theme-grid td { display: block; width: 100% !important; padding-right: 0 !important; }
}

@media (min-width: 960px) {
  .cm-cms-top .cm-hamburger { display: none; }
  .cm-cms-nav { display: block; }
}

@media (max-width: 768px) { .cm-portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 390px) { .cm-portfolio { grid-template-columns: 1fr; } }

/* ---- Modern footer (light, token-driven) ---- */
.cm-footer {
  background: hsl(var(--footer-bg));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  border-top: 1px solid hsl(var(--footer-border));
  width: 100%;
  box-sizing: border-box;
}
.cm-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 28px;
  align-items: start;
}
.cm-footer-col h4 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
}
.cm-footer-col ul { list-style: none; margin: 0; padding: 0; }
.cm-footer-col li { margin: 0 0 7px; line-height: 1.4; }
.cm-footer-col a {
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cm-footer-col a:hover { color: hsl(var(--primary-hover)); border-bottom-color: hsl(var(--primary-hover)); }
.cm-footer-brand .cm-footer-logo {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}
.cm-footer-tag { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: hsl(var(--muted-foreground)); }
.cm-footer-social { margin: 0; font-size: 14px; }
.cm-footer-social a { color: hsl(var(--primary-hover)); text-decoration: none; }
.cm-footer-social a:hover { text-decoration: underline; }
.cm-footer-contact p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.cm-footer-contact .cm-footer-legal-name { font-weight: 700; color: hsl(var(--foreground)); }
.cm-footer-bottom {
  border-top: 1px solid hsl(var(--footer-border));
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
}
.cm-footer-bottom p { margin: 0; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.cm-footer-bottom-links a { color: hsl(var(--foreground)); text-decoration: none; }
.cm-footer-bottom-links a:hover { color: hsl(var(--primary-hover)); }

.cm-blog-shell .cm-footer { margin-top: 24px; }

@media (max-width: 959px) {
  .cm-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cm-footer-brand { grid-column: 1 / -1; }
  .cm-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .cm-footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 28px 18px 18px; }
  .cm-footer-bottom { padding: 14px 18px 20px; }
}