/* Responsive compatibility layer — added 2026-08-15 */
:root {
  --site-bg: #fdf1ed;
  --site-ink: #221d16;
  --site-accent: #662eb4;
  --site-soft: #d0ccf1;
  --page-gutter: clamp(16px, 4vw, 56px);
  --content-max: 1180px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
  min-width: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip !important;
}

body {
  min-height: 100vh;
  background: var(--site-bg);
}

img, picture, svg, video, canvas, iframe {
  max-width: 100% !important;
}

img {
  height: auto !important;
}

button, input, textarea, select {
  max-width: 100%;
  font: inherit;
}

button, a, label {
  -webkit-tap-highlight-color: transparent;
}

p, li, span, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: anywhere;
}

p, li { text-indent: 0 !important; }

/* Replace the generator's abrupt 350/1440 scaling with useful device ranges. */
@media (max-width: 1199px) {
  :root { --resizer: 900 !important; }
}

@media (max-width: 699px) {
  :root { --resizer: 430 !important; }
}

/* Shared generated shells */
.page-home main,
.page-article main,
.page-home footer,
.page-article footer,
.page-legal > div {
  width: 100% !important;
  max-width: 100% !important;
}

.page-home main > div,
.page-article main > div,
.page-home main > div > div,
.page-article main > div > div {
  max-width: 100% !important;
}

.page-home main > div[style],
.page-article main > div[style] {
  width: 100% !important;
  padding-left: var(--page-gutter) !important;
  padding-right: var(--page-gutter) !important;
}

/* HOME — hero */
.page-home main > div:first-child {
  display: grid !important;
  grid-template-columns: minmax(260px, .92fr) minmax(0, 1.08fr) !important;
  align-items: center !important;
  gap: clamp(28px, 5vw, 72px) !important;
  width: 100% !important;
  max-width: none !important;
}

.page-home main > div:first-child > * {
  width: 100% !important;
  max-width: 100% !important;
}

.page-home main > div:first-child img {
  display: block;
  width: min(100%, 520px) !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  margin-inline: auto;
  border-radius: clamp(14px, 2vw, 28px) !important;
}

.page-home main > div:first-child h3 {
  font-size: clamp(34px, 4.1vw, 62px) !important;
  line-height: 1.06 !important;
  text-wrap: balance;
}

.page-home main > div:first-child span {
  line-height: 1.55 !important;
}

.page-home main > div:first-child > :last-child > :last-child {
  display: flex !important;
  flex-wrap: wrap !important;
  height: auto !important;
  gap: 12px !important;
}

.page-home main > div:first-child a {
  width: auto !important;
  max-width: 100% !important;
  min-height: 44px;
  padding: 10px 18px !important;
  flex: 1 1 150px;
}

/* HOME — album */
.page-home main > div:nth-child(2) {
  width: 100% !important;
  max-width: none !important;
  padding-left: var(--page-gutter) !important;
  padding-right: var(--page-gutter) !important;
}

.page-home main > div:nth-child(2) h3 {
  font-size: clamp(30px, 4vw, 54px) !important;
  line-height: 1.1 !important;
}

.page-home main > div:nth-child(2) > :nth-child(2) {
  width: 100% !important;
  max-width: 100% !important;
}

.page-home main > div:nth-child(2) > :nth-child(2) > div {
  width: min(100%, var(--content-max)) !important;
  max-width: var(--content-max) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(14px, 2vw, 24px) !important;
}

.page-home main > div:nth-child(2) > :nth-child(2) > div > img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 4 / 3;
  object-fit: cover !important;
  border-radius: clamp(14px, 2vw, 28px) !important;
}

/* HOME — article archive */
.page-home main > div:nth-child(3) {
  width: 100% !important;
  max-width: none !important;
  padding-left: var(--page-gutter) !important;
  padding-right: var(--page-gutter) !important;
}

.page-home main > div:nth-child(3) > :first-child h3 {
  font-size: clamp(32px, 4.4vw, 58px) !important;
  line-height: 1.08 !important;
}

.page-home main > div:nth-child(3) > :nth-child(2) {
  width: min(100%, var(--content-max)) !important;
  max-width: var(--content-max) !important;
  margin-inline: auto !important;
  gap: clamp(24px, 3vw, 42px) !important;
}

.page-home main > div:nth-child(3) > :nth-child(2) > div {
  display: grid !important;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 1.28fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  align-items: center !important;
  gap: clamp(18px, 3vw, 34px) !important;
  padding: clamp(16px, 2.3vw, 28px) !important;
  border-radius: 20px !important;
}

.page-home main > div:nth-child(3) > :nth-child(2) > div > * {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}

.page-home main > div:nth-child(3) > :nth-child(2) > div > :first-child img {
  display: block;
  width: min(100%, 300px) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  margin-inline: auto !important;
  border-radius: 16px !important;
}

.page-home main > div:nth-child(3) > :nth-child(2) > div > :last-child {
  align-items: stretch !important;
}

.page-home main > div:nth-child(3) h5 {
  font-size: clamp(22px, 2.2vw, 32px) !important;
  line-height: 1.18 !important;
  text-wrap: balance;
}

.page-home main > div:nth-child(3) span {
  line-height: 1.55 !important;
}

.page-home main > div:nth-child(3) a {
  min-height: 44px;
  width: auto !important;
  max-width: 100% !important;
  padding: 10px 14px !important;
}

/* normalize generated button / metadata rows inside cards */
.page-home main > div:nth-child(3) > :nth-child(2) > div > :last-child > div {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  flex-wrap: wrap !important;
}

/* HOME — discussion form */
.page-home main > div:nth-child(4),
.page-article main > div:nth-child(3) {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr) !important;
  align-items: center !important;
  gap: clamp(22px, 5vw, 64px) !important;
  padding-left: var(--page-gutter) !important;
  padding-right: var(--page-gutter) !important;
}

.page-home main > div:nth-child(4) > *,
.page-article main > div:nth-child(3) > * {
  width: 100% !important;
  max-width: 100% !important;
}

.page-home main > div:nth-child(4) form,
.page-article main > div:nth-child(3) form {
  display: flex !important;
  align-items: stretch !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.page-home main > div:nth-child(4) input,
.page-article main > div:nth-child(3) input {
  flex: 1 1 210px;
  width: auto !important;
  min-height: 48px;
  padding: 12px 16px !important;
}

.page-home main > div:nth-child(4) button,
.page-article main > div:nth-child(3) button {
  min-height: 48px;
  min-width: 120px;
  width: auto !important;
  padding: 12px 20px !important;
  cursor: pointer;
}

/* ARTICLE — compact title/intro */
.page-article main > div:first-child {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(34px, 5vw, 70px) var(--page-gutter) !important;
}

.page-article main > div:first-child > * {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin-inline: auto !important;
}

.page-article main > div:first-child h3 {
  font-size: clamp(32px, 4.2vw, 58px) !important;
  line-height: 1.08 !important;
  text-wrap: balance;
}

.page-article main > div:first-child span {
  line-height: 1.55 !important;
}

.page-article main > div:first-child a {
  display: inline-flex !important;
  width: fit-content !important;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px !important;
}

/* ARTICLE — readable body */
.page-article main > div:nth-child(2) {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(34px, 5vw, 76px) var(--page-gutter) !important;
}

.page-article main > div:nth-child(2) > * {
  width: min(100%, 920px) !important;
  max-width: 920px !important;
  margin-inline: auto !important;
}

.page-article main > div:nth-child(2) > * > :first-child {
  flex-wrap: wrap !important;
  gap: 10px 18px !important;
  height: auto !important;
}

.page-article main > div:nth-child(2) span {
  font-size: clamp(16px, 1.35vw, 19px) !important;
  line-height: 1.75 !important;
  text-align: left !important;
}

.page-article main > div:nth-child(2) p {
  margin-top: 1em !important;
  text-indent: 0 !important;
}

.page-article main > div:nth-child(2) li {
  margin: .5em 0 .5em 1.25em;
  text-indent: 0 !important;
}

/* LEGAL pages */
.page-legal {
  background: var(--site-soft) !important;
  color: var(--site-ink);
  align-items: stretch !important;
}

.page-legal > div {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(28px, 5vw, 70px) var(--page-gutter) !important;
  align-items: stretch !important;
}

.page-legal > div > span {
  display: block !important;
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin-inline: auto !important;
  font-size: clamp(15px, 1.25vw, 18px) !important;
  line-height: 1.7 !important;
  text-align: left !important;
}

.page-legal h2 {
  margin: 1.4em 0 .7em !important;
  font-size: clamp(24px, 3vw, 38px) !important;
  line-height: 1.15 !important;
  text-wrap: balance;
}

.page-legal ol,
.page-legal ul {
  padding-left: clamp(22px, 4vw, 42px) !important;
  margin: .75em 0 !important;
}

.page-legal li,
.page-legal p {
  text-indent: 0 !important;
  margin-block: .45em !important;
}

/* Footer shared across random generated class names. */
body > footer {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(24px, 4vw, 50px) var(--page-gutter) !important;
}

body > footer > div {
  width: min(100%, var(--content-max)) !important;
  max-width: var(--content-max) !important;
  margin-inline: auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 12px clamp(18px, 4vw, 44px) !important;
}

body > footer a {
  font-size: clamp(14px, 1.2vw, 17px) !important;
  line-height: 1.4 !important;
  padding: 8px 4px;
}

/* Cookie banner (present on the home page). */
body > section {
  width: min(calc(100% - 24px), 720px) !important;
  max-width: 720px !important;
  left: 50% !important;
  right: auto !important;
  bottom: 12px !important;
  transform: translateX(-50%);
  padding: clamp(14px, 3vw, 24px) !important;
  gap: 14px !important;
  border-radius: 18px !important;
  z-index: 1000;
}

body > section > * {
  width: 100% !important;
  max-width: 100% !important;
}

body > section label {
  display: inline-flex !important;
  width: auto !important;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px !important;
  cursor: pointer;
}

body > section span {
  font-size: clamp(13px, 1.1vw, 16px) !important;
  line-height: 1.45 !important;
}

/* Tablet */
@media (max-width: 900px) {
  .page-home main > div:first-child,
  .page-home main > div:nth-child(4),
  .page-article main > div:nth-child(3) {
    grid-template-columns: 1fr !important;
  }

  .page-home main > div:first-child > :last-child {
    text-align: center;
  }

  .page-home main > div:nth-child(2) > :nth-child(2) > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .page-home main > div:nth-child(3) > :nth-child(2) > div {
    grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr) !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body { overflow-x: hidden !important; }

  .page-home main > div[style],
  .page-article main > div[style] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .page-home main > div:first-child {
    gap: 24px !important;
  }

  .page-home main > div:first-child h3,
  .page-article main > div:first-child h3 {
    font-size: clamp(30px, 9.5vw, 42px) !important;
  }

  .page-home main > div:first-child > :last-child > :last-child,
  .page-home main > div:nth-child(4) form,
  .page-article main > div:nth-child(3) form {
    flex-direction: column !important;
  }

  .page-home main > div:first-child a,
  .page-home main > div:nth-child(4) input,
  .page-home main > div:nth-child(4) button,
  .page-article main > div:nth-child(3) input,
  .page-article main > div:nth-child(3) button {
    width: 100% !important;
    flex-basis: auto !important;
  }

  .page-home main > div:nth-child(2) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .page-home main > div:nth-child(2) > :nth-child(2) > div {
    grid-template-columns: 1fr !important;
  }

  .page-home main > div:nth-child(2) > :nth-child(2) > div > img {
    aspect-ratio: 16 / 10;
  }

  .page-home main > div:nth-child(3) {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .page-home main > div:nth-child(3) > :nth-child(2) > div {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .page-home main > div:nth-child(3) > :nth-child(2) > div > :first-child img {
    width: 100% !important;
    aspect-ratio: 16 / 10;
  }

  .page-home main > div:nth-child(3) h5 {
    font-size: clamp(22px, 7vw, 29px) !important;
  }

  .page-home main > div:nth-child(4),
  .page-article main > div:nth-child(3) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .page-article main > div:first-child {
    padding: 32px 18px !important;
  }

  .page-article main > div:nth-child(2) {
    padding: 32px 18px !important;
  }

  .page-article main > div:nth-child(2) span {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }

  .page-legal > div {
    padding: 28px 18px !important;
  }

  .page-legal > div > span {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  body > footer {
    padding: 24px 16px !important;
  }

  body > footer > div {
    flex-direction: column !important;
    align-items: center !important;
  }

  body > section {
    width: calc(100% - 16px) !important;
    bottom: 8px !important;
  }
}

@media (max-width: 380px) {
  :root { --resizer: 400 !important; }

  .page-home main > div:first-child h3,
  .page-article main > div:first-child h3 {
    font-size: 30px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
