:root {
  --ink: #1c2521;
  --ink-2: #3d4a44;
  --ink-3: #5b6660;
  --forest: #1f4a3c;
  --brass: #a97c34;
  --paper: #f6f3ec;
  --paper-2: #efe9dd;
  --paper-3: rgba(246, 243, 236, .68);
  --line: rgba(28, 37, 33, .12);
  --line-2: rgba(28, 37, 33, .22);
}

* {
  box-sizing: border-box;
}

/* /om-byran är klart kortare än övriga sidor och behöver ingen skrollbar — utan
   detta har den några pixlar mer bredd att jobba med än en sida MED skrollbar,
   vilket flyttade det centrerade innehållet (loggan/navet i .wrap) i sidled när
   man växlade mellan sidor på desktop. scrollbar-gutter reserverar utrymmet
   alltid, oavsett om sidan faktiskt skrollar eller ej, så bredden blir likadan
   överallt. Gäller bara desktop där skrollbaren äter av layoutbredden — mobilen
   har ingen sådan skillnad (och där syns navet ändå bara i hamburgermenyn). */
html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
}

a {
  color: var(--forest);
  text-decoration: none;
}

a:hover {
  color: var(--brass);
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 243, 236, .93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  order: 1;
  white-space: nowrap;
  font-family: 'Spectral', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--ink);
}

.logo span {
  color: var(--forest);
}

.header-actions {
  order: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: flex;
  border: 1.5px solid var(--line-2);
  border-radius: 20px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}

.lang-toggle button {
  padding: 6px 12px;
  background: transparent;
  color: var(--ink-3);
  border: none;
  font: inherit;
  cursor: pointer;
}

.lang-toggle button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.btn-cta {
  background: var(--forest);
  color: var(--paper);
  padding: 10px 20px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.btn-cta:hover {
  color: var(--paper);
  background: var(--brass);
}

.main-nav {
  order: 3;
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.main-nav a {
  color: var(--ink);
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a.is-active {
  color: var(--brass);
  border-bottom-color: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line-2);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-call-bar {
  display: none;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.15fr);
  align-items: stretch;
}

.hero__content {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.hero__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
}

.hero__headline {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  margin: 0;
}

.hero__sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--paper-2);
  max-width: 46ch;
  margin: 0;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-primary {
  background: var(--brass);
  color: var(--ink);
  padding: 14px 26px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 15px;
}

.btn-primary:hover {
  color: var(--ink);
  opacity: .9;
}

.btn-secondary {
  border: 1.5px solid var(--paper-2);
  color: var(--paper);
  padding: 14px 26px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 15px;
}

.btn-secondary:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.hero__image {
  position: relative;
  min-height: 340px;
  background: #0c1512;
}

.hero__image img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

/* Beskärningens fokuspunkt, satt per bild i admin.
   Hero-ytan har olika proportioner på olika skärmar, så bilden beskärs nästan alltid — på
   bredden i vissa lägen, på höjden i andra. Utan de här klasserna behålls alltid mitten, och
   ett motiv som sitter i kanten kapas bort. Klasser och inte inline-stilar, eftersom sidans
   säkerhetspolicy inte tillåter style-attribut i markupen. */
.hero-slide--top-left { object-position: 0% 0%; }
.hero-slide--top { object-position: 50% 0%; }
.hero-slide--top-right { object-position: 100% 0%; }
.hero-slide--left { object-position: 0% 50%; }
.hero-slide--center { object-position: 50% 50%; }
.hero-slide--right { object-position: 100% 50%; }
.hero-slide--bottom-left { object-position: 0% 100%; }
.hero-slide--bottom { object-position: 50% 100%; }
.hero-slide--bottom-right { object-position: 100% 100%; }

/* Hero rotation: all slides stacked, transition style selected via a modifier
   class on the container (set from the admin-chosen HeroSettings.Transition). */
.hero-slide {
  opacity: 0;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero__image--fade .hero-slide {
  transition: opacity 1.2s ease;
}

.hero__image--slide .hero-slide {
  transition: opacity 1.2s ease, transform 1.2s ease;
  transform: translateX(28px);
}

.hero__image--slide .hero-slide.is-active {
  transform: translateX(0);
}

.hero__image--zoom .hero-slide {
  transition: opacity 1.4s ease, transform 1.4s ease;
  transform: scale(1.06);
}

.hero__image--zoom .hero-slide.is-active {
  transform: scale(1);
}

.hero__image--cut .hero-slide {
  transition: none;
}

/* Trust bar */
.trust-bar {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.trust-bar__inner {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  gap: 16px 40px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.trust-bar__divider {
  width: 1px;
  height: 16px;
  background: var(--line-2);
}

.trust-bar__insurance {
  font-style: italic;
  color: var(--ink-3);
}

/* Section heading */
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-heading__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
}

.section-heading__title {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  margin: 14px 0 0;
}

/* Services */
.services {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  border: 1px solid var(--line-2);
  padding: 32px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card__rule {
  width: 36px;
  height: 2px;
  background: var(--brass);
}

.service-card h3 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0;
}

.service-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

.service-card a {
  font-weight: 700;
  font-size: 14px;
  margin-top: 6px;
}

/* Audience */
.audience {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audience__inner {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.audience__heading {
  text-align: center;
  margin-bottom: 44px;
}

.audience__heading h2 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 30px);
  margin: 0;
}

.audience__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.audience-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audience-card--dark {
  background: var(--ink);
  color: var(--paper);
}

.audience-card--dark .audience-card__kicker {
  color: var(--brass);
}

.audience-card--dark p {
  color: var(--paper-2);
}

.audience-card--dark a {
  color: var(--brass);
}

.audience-card--light {
  background: var(--paper);
  border: 1px solid var(--line-2);
}

.audience-card--light .audience-card__kicker {
  color: var(--forest);
}

.audience-card--light p {
  color: var(--ink-2);
}

.audience-card__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.audience-card h3 {
  font-family: 'Spectral', serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.audience-card p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.audience-card a {
  margin-top: 8px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper-2);
}

.site-footer__grid {
  padding: 56px clamp(20px, 4vw, 40px) 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  max-width: 1240px;
  margin: 0 auto;
}

.footer-brand {
  font-family: 'Spectral', serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--paper);
}

.footer-blurb {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 14px;
  max-width: 26ch;
  color: var(--paper-3);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-col__heading {
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 4px;
}

.footer-col a,
.footer-col span {
  color: var(--paper-3);
}

.site-footer__bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: var(--paper-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-lang {
  display: flex;
  gap: 6px;
}

.footer-lang button {
  color: rgba(246, 243, 236, .5);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.footer-lang button.is-active {
  color: var(--paper);
  font-weight: 700;
}

.error-page {
  padding: 80px 0;
  text-align: center;
}

.content-page {
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 40px) clamp(48px, 7vw, 88px);
  max-width: 800px;
}

/* Card grids need the full column width; prose stays narrow for readability. */
.content-page--wide {
  max-width: 1100px;
}

.content-page__title {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 24px;
}

.content-page__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-line;
}

.content-page__lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 68ch;
}

/* Page head band — gives every subpage a proper entry point and a way back up.
   Deliberately light so it complements rather than competes with the home hero. */
.page-head {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: clamp(20px, 3vw, 32px) 0 clamp(24px, 3.5vw, 36px);
}

.page-head__title {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 12px 0 0;
  max-width: 22ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--forest);
}

.breadcrumb a:hover {
  color: var(--brass);
  text-decoration: underline;
}

.breadcrumb__sep {
  color: var(--ink-3);
}

.breadcrumb__current {
  color: var(--ink-3);
  font-weight: 500;
}

/* Long admin-edited prose (legal pages, Om byrån) */
.rich-text {
  color: var(--ink-2);
  max-width: 68ch;
}

.rich-text p {
  font-size: 17px;
  line-height: 1.85;
  margin: 0 0 18px;
}

.rich-text__heading {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  margin: 40px 0 12px;
}

.rich-text__heading:first-child {
  margin-top: 0;
}

/* Closing contact block — an exit path from pages that would otherwise dead-end. */
.closing-cta {
  margin-top: 56px;
  padding: 32px;
  background: var(--paper-2);
  border-left: 3px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.closing-cta__text {
  font-family: 'Spectral', serif;
  font-size: 20px;
  color: var(--ink);
  margin: 0;
}

.closing-cta .btn-primary {
  display: inline-block;
  white-space: nowrap;
}

/* Practice-area (tjänsteområde) pages */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  padding: 28px;
  color: var(--ink);
}

.category-card:hover {
  border-color: var(--forest);
}

.category-card h2 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 19px;
  margin: 0;
  color: var(--ink);
}

.category-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  flex: 1;
}

.category-card__link {
  font-weight: 700;
  font-size: 14px;
  color: var(--forest);
}

.category-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 24px;
}

.category-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-item-list li {
  padding: 16px 20px;
  background: var(--paper-2);
  border-left: 3px solid var(--brass);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

.info-card {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  padding: 28px 32px;
}

/* Contact form */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.contact-aside {
  position: sticky;
  top: 140px;
}

.contact-aside__title {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 16px;
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-details__item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--forest);
}

.contact-details__value {
  min-width: 0;
  word-break: break-word;
}

/* First row is the firm/person name — give it a little more weight. */
.contact-details__item:first-child .contact-details__value {
  font-weight: 700;
  color: var(--ink);
}

.contact-details a {
  color: var(--forest);
}

.contact-details a:hover {
  color: var(--brass);
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form .admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.field-hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.5;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.consent-field input {
  margin-top: 3px;
  width: auto;
  flex-shrink: 0;
}

.contact-form__submit {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
  padding-left: 32px;
  padding-right: 32px;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice-box {
  background: var(--paper-2);
  border-left: 3px solid var(--brass);
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 640px;
}

.notice-box strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.notice-box p {
  margin: 0;
}

/* Submission receipt */
.receipt {
  max-width: 640px;
  background: var(--paper-2);
  border-left: 3px solid var(--forest);
  padding: 36px 40px;
}

.receipt__mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.receipt h2 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 16px;
}

.receipt p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
}

.receipt__case strong {
  font-family: 'Spectral', serif;
  font-size: 20px;
  color: var(--ink);
  margin-left: 4px;
}

/* Client case portal */
.case-panel {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  padding: 28px 32px;
}

.case-panel__head {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.case-panel__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.case-original {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0;
  white-space: pre-line;
}

.status-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
}

.status-pill--new { background: #e2e9f2; color: #26405e; }
.status-pill--review { background: #f3ecdc; color: #6b5117; }
.status-pill--active { background: #e5efe9; color: #1f4a3c; }
.status-pill--waiting { background: #f6e9d8; color: #8a5a17; }
.status-pill--closed { background: #e6e4df; color: #4a4a45; }
.status-pill--declined { background: #f0e5e0; color: #8a2e26; }

.case-section-title {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 22px;
  margin: 44px 0 18px;
}

.case-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-message {
  padding: 20px 24px;
  border-left: 3px solid var(--line-2);
  background: #fff;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-message--firm {
  border-left-color: var(--forest);
  background: var(--paper-2);
}

.case-message--customer {
  border-left-color: var(--brass);
}

.case-message__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.case-message__meta strong {
  color: var(--ink);
}

.case-message p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-line;
}

.case-empty {
  font-size: 15px;
  color: var(--ink-3);
  font-style: italic;
  margin: 0;
}

.case-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-file-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--brass);
}

.case-file-list a {
  font-weight: 700;
}

.case-file-list__meta {
  font-size: 13px;
  color: var(--ink-3);
}

/* Spacing utilities.
   These exist because the Content-Security-Policy has no 'unsafe-inline' for styles, which
   means a style="..." attribute is silently DROPPED by the browser. Any layout that matters
   must live in this file — never in a style attribute. */
.u-inline-block { display: inline-block; }
.u-mt-24 { margin-top: 24px; }
.u-mt-32 { margin-top: 32px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-20 { margin-bottom: 20px; }
.u-mb-24 { margin-bottom: 24px; }
.u-mb-48 { margin-bottom: 48px; }

/* Logo sizes match the three presets offered in admin (LogoSize.Presets). */
.logo-img {
  width: auto;
  display: block;
}

.logo-img--sm { height: 32px; }
.logo-img--md { height: 40px; }
.logo-img--lg { height: 48px; }

/* Language toggle: sv shown by default, en shown when body.lang-en is set */
[data-lang="en"] {
  display: none;
}

body.lang-en [data-lang="sv"] {
  display: none;
}

body.lang-en [data-lang="en"] {
  display: inline;
}

/* Block-level language containers (rich text wraps h2/p, so inline won't do).
   Must come after the rules above to win on specificity. */
.lang-block[data-lang="sv"] {
  display: block;
}

.lang-block[data-lang="en"] {
  display: none;
}

body.lang-en .lang-block[data-lang="sv"] {
  display: none;
}

body.lang-en .lang-block[data-lang="en"] {
  display: block;
}

/* ---------------------------------------------------------------------
   Mobile (<=760px): people arriving here are often looking for help, not
   a portfolio piece — prioritise the message and a way to reach us over
   large imagery. Stack the hero with text first, shrink the photo,
   collapse the nav behind a toggle, enlarge tap targets, and add an
   always-visible call/contact bar.
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  /* grid-template-columns:1fr räckte inte på iPhone/Safari — hero-bilden stannade
     på ~97% av skärmbredden. Grid-celler får ett osynligt min-width:auto som låter
     innehåll (särskilt en <img>) stå emot att krympa till hela spårets bredd, och
     WebKit exponerar det tydligare än Chromium. flex + uttrycklig width:100% på
     barnen är en mer robust lösning för en enkel enkolumnslayout som denna.
     Bekräftat fixat live på iPhone via /dev/hero-playground (variant B), 2026-08-07. */
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero__content {
    padding: 32px 20px 28px;
    gap: 18px;
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .hero__kicker {
    font-size: 11px;
  }

  .hero__headline {
    font-size: clamp(26px, 7vw, 32px);
  }

  .hero__image {
    /* Var tidigare en fast höjd på 180px. Eftersom bilden ligger absolutpositionerad inuti
       blev 180px också den exakta höjden — på en telefon en tunn remsa som inte läste som
       ett fotografi, och med hård beskärning på höjden.
       Proportionell höjd växer i stället med skärmbredden: ~260px på en vanlig telefon.
       Golvet fångar de riktigt smala skärmarna. */
    aspect-ratio: 3 / 2;
    min-height: 240px;
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions a {
    flex: 1 1 auto;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* The mobile call bar covers "contact us"; decluttering the sticky header. */
  .header-actions .btn-cta {
    display: none;
  }

  /* Loggan + SV/EN + hamburgermenyn radbröt på iPhone/Safari trots att det fanns
     plats — samma symptom som hero-bredden ovan, oklart om det är exakt samma
     grundorsak. Mindre gap + kompaktare logga/språkknappar löste det.
     Bekräftat fixat live på iPhone via /dev/hero-playground (variant B), 2026-08-07. */
  .site-header__inner {
    gap: 8px 10px;
  }

  .logo {
    font-size: 18px;
  }

  .lang-toggle button {
    padding: 4px 8px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0;
    margin-top: 10px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--line);
  }

  .btn-cta,
  .btn-primary,
  .btn-secondary,
  .admin-btn {
    min-height: 44px;
  }

  body {
    padding-bottom: 60px;
  }

  .mobile-call-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: var(--forest);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-call-bar a {
    flex: 1 1 50%;
    text-align: center;
    padding: 14px 8px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paper);
    font-weight: 700;
    font-size: 14px;
  }

  .mobile-call-bar a:first-child {
    background: var(--brass);
    color: var(--ink);
  }

  .mobile-call-bar a:hover {
    color: inherit;
    opacity: .9;
  }

  /* Breadcrumbs are the primary way back on mobile (the nav is behind ☰),
     so keep them readable but let long trails wrap instead of overflowing. */
  .page-head {
    padding: 16px 0 20px;
  }

  .page-head__title {
    font-size: clamp(24px, 6.5vw, 30px);
    max-width: none;
  }

  .breadcrumb {
    font-size: 13px;
    gap: 6px;
  }

  .content-page__lead {
    font-size: 16px;
  }

  .rich-text p {
    font-size: 16px;
  }

  .rich-text__heading {
    font-size: 18px;
    margin-top: 32px;
  }

  .closing-cta {
    margin-top: 40px;
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .closing-cta__text {
    font-size: 18px;
  }

  .closing-cta .btn-primary {
    width: 100%;
    text-align: center;
  }

  /* An active nav item sits inside the collapsed menu — a left bar reads
     better there than the desktop underline. */
  .main-nav a.is-active {
    border-bottom-color: transparent;
    border-left: 3px solid var(--brass);
    padding-left: 10px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Contact details belong above the form on a phone — many people would rather
     just call than type out their situation. */
  .contact-aside {
    position: static;
    order: -1;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  .contact-form__submit {
    width: 100%;
  }

  .receipt {
    padding: 28px 22px;
  }

  .case-panel {
    padding: 24px 20px;
  }
}
