:root {
  --mobile-gutter: 20px;
  --mobile-section-space: 44px;
  --mobile-section-gap: 28px;
  --mobile-card-gap: 16px;
  --mobile-control-height: 48px;
  --mobile-hero-top: 28px;
  --mobile-hero-bottom: 36px;
  --mobile-eyebrow-heading-gap: var(--own-site-eyebrow-heading-gap);
  --mobile-heading-copy-gap: 20px;
  --mobile-copy-actions-gap: 24px;
  --mobile-page-title-size: var(--own-site-hero-title-font-size);
  --mobile-section-title-size: var(--own-site-section-title-font-size);
}

html {
  overflow-x: clip;
}

body {
  min-width: 0;
  overflow-x: clip;
  font-size: 16px;
  line-height: 1.55;
}

.rail {
  width: 100%;
  max-width: none;
  padding-inline: var(--mobile-gutter);
}

main,
section,
article,
form,
fieldset,
label,
input,
select,
textarea {
  min-width: 0;
}

h1,
:where(body, main) section h1,
:where(body, main) section h2,
:where(body, main) section .section-heading {
  max-width: none !important;
}

h1 {
  font-size: var(--own-site-hero-title-font-size);
  line-height: var(--own-site-hero-title-line-height);
  font-weight: var(--own-site-hero-title-font-weight);
  letter-spacing: var(--own-site-hero-title-letter-spacing);
}

h2 {
  font-size: var(--own-site-section-title-font-size);
  line-height: var(--own-site-section-title-line-height);
  font-weight: var(--own-site-section-title-font-weight);
  letter-spacing: var(--own-site-section-title-letter-spacing);
}

h3 {
  line-height: var(--own-site-small-title-line-height);
  font-size: var(--own-site-small-title-font-size);
  font-weight: var(--own-site-small-title-font-weight);
  letter-spacing: var(--own-site-small-title-letter-spacing);
}

:where(body, main) section .eyebrow {
  margin-top: 0 !important;
  margin-bottom: var(--mobile-eyebrow-heading-gap) !important;
}

:where(body, main) section .eyebrow + h1,
:where(body, main) section .eyebrow + h2,
:where(body, main) section .eyebrow + h3 {
  margin-top: 0 !important;
}

/*
 * Standard public hero geometry. Page mobile styles still own composition,
 * but a desktop min-height or height must never survive into mobile flow.
 */
body > section.hero,
main > section.hero {
  height: auto !important;
  min-height: 0 !important;
  padding-block: var(--mobile-hero-top) var(--mobile-hero-bottom) !important;
}

body > section.hero > .hero-grid,
main > section.hero > .hero-grid {
  height: auto !important;
  min-height: 0 !important;
  padding-block: 0 !important;
}

.hero-copy-offset {
  margin-top: 0;
}

.hero-copy h1,
.demo-hero h1,
.error-copy h1 {
  font-size: var(--own-site-hero-title-font-size);
  line-height: var(--own-site-hero-title-line-height);
  font-weight: var(--own-site-hero-title-font-weight);
  letter-spacing: var(--own-site-hero-title-letter-spacing);
}

:where(body, main) section h1 + p:not(.eyebrow),
:where(body, main) section h2 + p:not(.eyebrow) {
  margin-top: var(--mobile-heading-copy-gap) !important;
}

:where(body, main) section h2 + div,
:where(body, main) section h2 + ol,
:where(body, main) section h2 + ul,
:where(body, main) section .section-heading + div,
:where(body, main) section .section-heading + ol,
:where(body, main) section .section-heading + ul {
  margin-top: var(--mobile-copy-actions-gap);
}

:where(body, main) section p + .button,
:where(body, main) section p + .action-row,
:where(body, main) section p + .button-row,
:where(body, main) section p + .after-link,
:where(body, main) section .error-actions {
  margin-top: var(--mobile-copy-actions-gap) !important;
}

p,
label,
legend,
input,
select,
textarea {
  overflow-wrap: break-word;
  word-break: normal;
}

a,
button,
summary {
  overflow-wrap: normal;
  word-break: normal;
}

img,
picture {
  max-width: 100%;
}

.button,
button.button {
  width: 100%;
  min-height: var(--mobile-control-height);
  height: auto;
  padding: 12px 18px;
  white-space: normal;
  text-align: center;
}

.button-row,
.action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: var(--mobile-control-height);
  padding: 12px 14px;
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  min-height: 22px;
  margin: 0;
  flex: 0 0 22px;
}

fieldset {
  padding: 0;
  border: 0;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mobile-media-placeholder {
  display: none;
}

@media (max-width: 420px) {
  :root {
    --mobile-gutter: 16px;
  }

}

/* Single-line notices center icon and text; wrapped text retains first-line alignment. */
.notice.info,
.notice.warning,
.notice.info.info-callout {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 64px;
  margin-top: 20px;
  padding: 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  border: 1px solid #7ca4ff;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}
.notice.info { color: var(--blue); }
.notice.warning { color: #c76500; border-color: #f1b96d; }
.notice.info > img,
.notice.warning > img,
.notice.info.info-callout > img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-self: flex-start;
  /* Match the visible glyph top inside the first text line. */
  margin: 3px 0 0;
  object-fit: contain;
}
.notice.info > .info-callout__content { min-width: 0; text-align: left; }

/* Informative screens are separate assets; decorative Hero/CTA remain suppressed. */
.explanatory-frame.ex-home, .explanatory-frame.ex-project, .explanatory-frame.ex-map { display: grid; grid-template-columns: minmax(0,1fr); justify-items: center; gap: 10px; width: 100%; max-width: 680px; height: auto; min-height: 0; aspect-ratio: auto; padding: 0; margin: 28px auto 0; overflow: visible; }
.explanatory-frame > .ex-screen { position: static; width: 100%; max-width: 545px; height: auto; }
.explanatory-frame > .ex-platform-runtime { max-width: 280px; }
.explanatory-frame > .ex-platform-handover { max-width: 400px; }
.explanatory-frame > .ex-link { position: relative; inset: auto; width: 36px; height: 64px; }
.explanatory-frame > .ex-home-link { height: 56px; background-position: center top, center bottom; }
.explanatory-frame > .ex-project-link { height: 96px; }
.ex-link::before { left: 50%; right: auto; top: 4px; bottom: 4px; border-top: 0; border-left: 1.5px dashed currentColor; transform: translateX(-50%); }
.ex-link::after { left: 50%; right: auto; top: auto; bottom: 4px; transform: translateX(-50%) rotate(135deg); }
.explanatory-frame .ex-steps { position: static; width: 100%; max-width: 360px; height: auto; padding: 14px 18px; gap: 12px; grid-template-rows: none; }
.ex-steps > li { min-height: 48px; grid-template-columns: 32px minmax(0,1fr); font-size: 14px; gap: 14px; }
.ex-steps svg { width: 32px; height: 32px; }
.ex-steps > li:not(:last-child)::after { left: 15px; top: calc(50% + 20px); bottom: calc(-50% + 9px); }

.system-map.explanatory-frame { width: calc(100% - 2 * var(--mobile-gutter)); max-width: 648px; }

.notice.info:not([data-notice-multiline]),
.notice.warning:not([data-notice-multiline]),
.notice.info.info-callout:not([data-notice-multiline]) { align-items: center; }
.notice.info:not([data-notice-multiline]) > img,
.notice.warning:not([data-notice-multiline]) > img,
.notice.info.info-callout:not([data-notice-multiline]) > img { align-self: center; margin: 0; }
