:root {
  color-scheme: light;
  --cream: #f3eee4;
  --cream-deep: #e7dfd2;
  --paper: #fbf8f1;
  --coffee: #2a1914;
  --coffee-soft: #5e4940;
  --brick: #bd4a31;
  --brick-dark: #8f3424;
  --orange: #dd6a43;
  --beige-control: #d9d1c4;
  --line: rgba(42, 25, 20, 0.16);
  --shadow: 0 26px 70px rgba(57, 32, 22, 0.16);
  --serif: Georgia, 'Times New Roman', 'Songti SC', 'SimSun', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  min-width: 320px;
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--coffee);
  background: var(--cream);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--paper);
  background: var(--coffee);
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #f49a6c;
  outline-offset: 4px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.wordmark--light {
  color: #fffaf2;
}

.wordmark-mark {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  font-size: 1rem;
}

.eyebrow {
  margin: 0;
  color: rgba(255, 250, 242, 0.82);
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--brick);
}

/* Landing */

.landing-page {
  overflow-x: hidden;
  color: #fffaf2;
  background: #181311;
}

.landing-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.6rem;
  padding: 0 2rem;
  color: rgba(255, 250, 242, 0.86);
  mix-blend-mode: normal;
}

.header-context {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-shell {
  min-height: 100vh;
  padding: 0.78rem;
}

#landing,
#ai-platform {
  scroll-margin-top: 0;
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 1.56rem);
  overflow: hidden;
  place-items: center;
  border-radius: 1.8rem;
  isolation: isolate;
  background: #2f241f;
}

.landing-media,
.landing-slide,
.landing-shade {
  position: absolute;
  inset: 0;
}

.landing-slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-slide.is-active {
  opacity: 1;
  animation: ken-burns 10s ease-out both;
}

.landing-slide.is-immediate {
  transition: none;
}

.landing-shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 12, 10, 0.22) 0%, rgba(20, 12, 10, 0.22) 35%, rgba(19, 12, 10, 0.78) 100%),
    radial-gradient(circle at 50% 44%, rgba(19, 12, 10, 0.03), rgba(19, 12, 10, 0.34) 72%);
}

.landing-copy {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(90vw, 980px);
  align-items: center;
  flex-direction: column;
  padding: 6rem 1rem 4rem;
  text-align: center;
}

.landing-title {
  margin: 1.2rem 0 1.35rem;
  font-family: var(--serif);
  font-size: clamp(3.35rem, 8.7vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
  text-wrap: balance;
}

.landing-title span {
  display: block;
}

.landing-intro {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 250, 242, 0.84);
  font-family: var(--serif);
  font-size: clamp(0.92rem, 1.45vw, 1.15rem);
  letter-spacing: 0.012em;
  line-height: 1.6;
}

.primary-access {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  gap: 1.35rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 0.42rem 0.52rem 0.42rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fffaf2;
  background: var(--brick);
  box-shadow: 0 14px 34px rgba(60, 19, 12, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.primary-access:hover,
.primary-access:focus-visible {
  background: var(--brick-dark);
  box-shadow: 0 18px 42px rgba(60, 19, 12, 0.36);
  transform: translateY(-2px);
}

.access-arrow {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  color: var(--brick-dark);
  background: #fff4e8;
  font-size: 1rem;
}

.landing-progress {
  position: absolute;
  z-index: 4;
  bottom: 1.55rem;
  left: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.slide-count,
.slide-place {
  color: rgba(255, 250, 242, 0.78);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.slide-controls {
  display: flex;
  gap: 0.35rem;
}

.slide-control {
  position: relative;
  width: 1.9rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.slide-control::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 250, 242, 0.34);
  content: '';
  transform: translateY(-50%);
  transition: background 200ms ease, transform 200ms ease;
}

.slide-control[aria-current='true']::before,
.slide-control:hover::before,
.slide-control:focus-visible::before {
  background: #fffaf2;
  transform: translateY(-50%) scaleY(1.8);
}

.slide-place {
  position: absolute;
  z-index: 4;
  right: 1.75rem;
  bottom: 1.86rem;
  margin: 0;
}

.reveal-line {
  opacity: 0;
  animation: reveal-up 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-line--delay-1 { animation-delay: 100ms; }
.reveal-line--delay-2 { animation-delay: 210ms; }
.reveal-line--delay-3 { animation-delay: 350ms; }
.reveal-line--delay-4 { animation-delay: 480ms; }

/* Portal */

.portal-page,
.embedded-portal {
  min-height: 100vh;
  color: var(--coffee);
  background:
    radial-gradient(circle at 88% 2%, rgba(221, 106, 67, 0.08), transparent 24rem),
    var(--cream);
}

.portal-header,
.preview-header {
  display: flex;
  width: min(100% - 3rem, 1440px);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.portal-meta,
.preview-environment {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--coffee-soft);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-header {
  width: min(100% - 4rem, 1080px);
  padding: 1rem 0;
}

.portal-header .wordmark {
  font-size: 0.76rem;
}

.portal-header .wordmark-mark {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.85rem;
}

.portal-meta {
  gap: 0.45rem;
  color: rgba(94, 73, 64, 0.72);
  font-size: 0.58rem;
}

.prototype-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(221, 106, 67, 0.14);
}

.portal-main {
  width: min(100% - 4rem, 1080px);
  margin: 0 auto;
  padding: clamp(2.9rem, 4.5vw, 4.5rem) 0 4.5rem;
}

.portal-intro {
  display: grid;
  align-items: end;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.55fr);
}

.portal-intro h1 {
  max-width: 620px;
  margin: 0.65rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 4.2vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.96;
}

.portal-intro-copy {
  max-width: 340px;
  margin: 0 0 0.2rem auto;
  color: rgba(94, 73, 64, 0.76);
  font-size: clamp(0.76rem, 0.9vw, 0.86rem);
  line-height: 1.65;
}

.prototype-notice {
  max-width: 760px;
  margin: 1.45rem 0 3.7rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid rgba(189, 74, 49, 0.14);
  border-radius: 0.7rem;
  color: rgba(114, 64, 49, 0.72);
  background: rgba(255, 246, 235, 0.34);
  font-size: 0.66rem;
  line-height: 1.55;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.section-heading-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}

.section-heading-row span {
  color: var(--coffee-soft);
  font-size: 0.56rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-grid {
  display: grid;
  align-items: start;
  gap: clamp(1.25rem, 2.25vw, 1.8rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-card {
  position: relative;
  min-height: 24.5rem;
  overflow: hidden;
  border: 1px solid rgba(63, 37, 28, 0.08);
  border-radius: 1.3rem;
  color: #fffaf2;
  background: #6d4b3d;
  box-shadow: 0 7px 22px rgba(57, 32, 22, 0.06);
  isolation: isolate;
  transform: translateY(0) scale(1);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 360ms ease, border-color 360ms ease;
}

.module-card:hover,
.module-card:focus-within {
  border-color: rgba(189, 74, 49, 0.3);
  box-shadow: 0 18px 38px rgba(57, 32, 22, 0.16);
  transform: translateY(-5px) scale(1.008);
}

.module-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 1rem;
  border-radius: inherit;
  color: #fff9ef;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.module-image::before,
.module-image::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
}

.module-image::before {
  background-image: inherit;
  background-position: inherit;
  background-size: inherit;
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
}

.module-image::after {
  background:
    linear-gradient(180deg, rgba(31, 19, 15, 0.2) 0%, rgba(31, 19, 15, 0.32) 30%, rgba(30, 18, 14, 0.9) 100%),
    linear-gradient(135deg, rgba(175, 61, 36, 0.32), transparent 56%);
}

.module-card:hover .module-image::before,
.module-card:focus-within .module-image::before {
  filter: saturate(1.06);
  transform: scale(1.075);
}

.module-number,
.module-english {
  position: absolute;
  z-index: 2;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.module-number {
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  background: rgba(55, 29, 20, 0.18);
}

.module-english {
  top: 1.08rem;
  right: 1.05rem;
}

.module-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 24.5rem;
  flex-direction: column;
  padding: 4.1rem 1.05rem 0.95rem;
}

.module-content h3 {
  margin: 0;
  color: #fffaf2;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.65vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(24, 13, 10, 0.28);
}

.module-description {
  max-width: 94%;
  min-height: 3.2em;
  margin: 0.6rem 0 1rem;
  color: rgba(255, 250, 242, 0.76);
  font-size: 0.68rem;
  line-height: 1.55;
}

.tool-list {
  display: grid;
  gap: 0;
  margin: auto 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 250, 242, 0.24);
  list-style: none;
}

.tool-item {
  display: flex;
  min-height: 3.15rem;
  align-items: center;
  gap: 0.7rem;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 250, 242, 0.2);
}

.tool-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.tool-copy strong {
  overflow: hidden;
  color: #fffaf2;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-copy small {
  color: rgba(255, 250, 242, 0.66);
  font-size: 0.57rem;
  line-height: 1.35;
}

.tool-link,
.tool-locked {
  display: inline-flex;
  min-width: 3.9rem;
  min-height: 1.9rem;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.32rem;
  justify-content: center;
  padding: 0 0.62rem;
  border-radius: 999px;
  font-size: 0.57rem;
  font-weight: 700;
  text-decoration: none;
}

.tool-link {
  border: 1px solid rgba(255, 250, 242, 0.18);
  color: #fffaf2;
  background: rgba(189, 74, 49, 0.94);
  transition: background 180ms ease, transform 180ms ease;
}

.tool-link:hover,
.tool-link:focus-visible {
  background: var(--brick-dark);
  transform: translateY(-1px);
}

/* Authorized tool exit transition */

html.is-tool-transitioning,
html.is-tool-transitioning body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-tool-transitioning body {
  cursor: wait;
  user-select: none;
}

html.is-tool-transitioning body > *:not(.tool-transition-overlay) {
  pointer-events: none;
}

.tool-transition-fade {
  opacity: 0 !important;
  filter: blur(4px);
  transform: translateY(-0.45rem);
  transition:
    opacity 360ms ease,
    filter 520ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.is-tool-transitioning .module-card.is-transition-source {
  opacity: 0;
  transition: opacity 90ms linear;
}

.is-tool-transitioning .module-card.is-transition-exit {
  opacity: 0;
  filter: blur(7px);
  transform:
    translate3d(var(--collapse-x), var(--collapse-y), 0)
    scale(0.62);
  transition:
    opacity 500ms ease 40ms,
    filter 600ms ease,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-transition-overlay {
  position: fixed;
  z-index: 2000;
  min-height: 0 !important;
  margin: 0;
  pointer-events: none;
  transform: translateZ(0);
  transform-origin: center;
  transition:
    top 760ms cubic-bezier(0.76, 0, 0.24, 1),
    left 760ms cubic-bezier(0.76, 0, 0.24, 1),
    width 760ms cubic-bezier(0.76, 0, 0.24, 1),
    height 760ms cubic-bezier(0.76, 0, 0.24, 1),
    border-radius 680ms cubic-bezier(0.76, 0, 0.24, 1),
    box-shadow 600ms ease;
  will-change: top, left, width, height, border-radius;
}

.tool-transition-overlay .module-content {
  min-height: 100%;
}

.tool-transition-overlay .tool-transition-shade {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: rgba(24, 13, 10, 0.22);
  opacity: 0;
  transition: opacity 650ms ease 80ms;
}

.tool-transition-overlay .tool-item.is-transition-target {
  border-color: rgba(255, 250, 242, 0.55);
  background: rgba(189, 74, 49, 0.24);
  box-shadow: 0 0 0 0.55rem rgba(189, 74, 49, 0.24);
}

.tool-transition-overlay.is-expanded {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  box-shadow: none;
}

.tool-transition-overlay.is-expanded .module-image::before {
  transform: scale(1.04);
}

.tool-transition-overlay.is-expanded .tool-transition-shade {
  opacity: 1;
}

.tool-locked {
  border: 1px solid rgba(255, 250, 242, 0.18);
  color: rgba(255, 250, 242, 0.72);
  background: rgba(238, 228, 213, 0.14);
  backdrop-filter: blur(7px);
  cursor: not-allowed;
}

.lock-shape {
  position: relative;
  width: 0.58rem;
  height: 0.46rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.lock-shape::before {
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  width: 0.34rem;
  height: 0.32rem;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 0.35rem 0.35rem 0 0;
  content: '';
  transform: translateX(-50%);
}

.portal-footer {
  display: flex;
  width: min(100% - 4rem, 1080px);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 1.1rem 0 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--coffee-soft);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
}

/* Local tool integration preview */

.tool-preview-page {
  background:
    radial-gradient(circle at 20% 12%, rgba(221, 106, 67, 0.2), transparent 24rem),
    var(--cream);
}

.back-to-portal {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.back-to-portal span:first-child {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  transition: transform 180ms ease, border-color 180ms ease;
}

.back-to-portal:hover span:first-child,
.back-to-portal:focus-visible span:first-child {
  border-color: var(--brick);
  transform: translateX(-2px);
}

.preview-main {
  display: grid;
  width: min(100% - 3rem, 1160px);
  min-height: calc(100vh - 5rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
  place-items: center;
}

.preview-panel {
  width: min(100%, 840px);
  padding: clamp(2rem, 6vw, 5.5rem);
  border: 1px solid rgba(63, 37, 28, 0.12);
  border-radius: 2rem;
  background: rgba(251, 248, 241, 0.84);
  box-shadow: var(--shadow);
}

.preview-kicker {
  color: var(--brick);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.preview-panel h1 {
  margin: 1.1rem 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.preview-panel > p {
  max-width: 670px;
  color: var(--coffee-soft);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.7;
}

.preview-rule {
  display: grid;
  align-items: start;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  grid-template-columns: auto 1fr;
}

.preview-rule-number {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  color: #fffaf2;
  background: var(--brick);
  font-size: 0.66rem;
  font-weight: 700;
}

.preview-rule p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.65;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(1.2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ken-burns {
  from { transform: scale(1.035); }
  to { transform: scale(1.115); }
}

@media (max-width: 900px) {
  .portal-intro {
    grid-template-columns: 1fr;
  }

  .portal-intro-copy {
    max-width: 680px;
    margin: 0;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .landing-header {
    height: 4.2rem;
    padding: 0 1.15rem;
  }

  .header-context {
    max-width: 8rem;
    text-align: right;
  }

  .landing-shell {
    padding: 0.45rem;
  }

  .landing-hero {
    min-height: calc(100svh - 0.9rem);
    border-radius: 1.25rem;
  }

  .landing-copy {
    width: 100%;
    padding: 5.6rem 1.1rem 6.5rem;
  }

  .landing-title {
    margin-top: 0.95rem;
    font-size: clamp(3.15rem, 17vw, 5.5rem);
  }

  .landing-intro br {
    display: none;
  }

  .landing-progress {
    bottom: 1.15rem;
    left: 1rem;
  }

  .slide-control {
    width: 1.15rem;
  }

  .slide-place {
    right: 1rem;
    bottom: 1.45rem;
  }

  .portal-header,
  .preview-header,
  .portal-main,
  .portal-footer,
  .preview-main {
    width: min(100% - 2rem, 1440px);
  }

  .portal-meta,
  .preview-environment {
    font-size: 0.58rem;
  }

  .portal-main {
    padding-top: 2.8rem;
  }

  .portal-intro h1 {
    font-size: clamp(2.7rem, 12vw, 4.25rem);
  }

  .portal-intro-copy {
    max-width: 32rem;
    font-size: 0.82rem;
  }

  .prototype-notice {
    margin: 1.2rem 0 2.8rem;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card,
  .module-content {
    min-height: 27rem;
  }

  .module-description {
    min-height: 0;
  }

  .module-content {
    padding: 4.25rem 1.15rem 1.1rem;
  }

  .tool-item {
    min-height: 4rem;
  }

  .tool-copy strong {
    font-size: 0.82rem;
  }

  .tool-copy small {
    font-size: 0.64rem;
  }

  .tool-link,
  .tool-locked {
    min-width: 5rem;
    min-height: 2.75rem;
    font-size: 0.65rem;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .preview-header {
    align-items: flex-start;
    gap: 1rem;
  }

  .preview-environment {
    max-width: 9rem;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .wordmark {
    font-size: 0.76rem;
  }

  .landing-title {
    font-size: 3.35rem;
  }

  .primary-access {
    width: min(100%, 18rem);
  }

  .slide-place {
    display: none;
  }

  .portal-intro h1 {
    font-size: 2.85rem;
  }

  .module-content {
    padding-right: 1.05rem;
    padding-left: 1.05rem;
  }

  .tool-copy strong {
    font-size: 0.78rem;
  }

  .tool-link,
  .tool-locked {
    min-width: 4.8rem;
    padding: 0 0.7rem;
  }
}

@media (hover: none) {
  .module-card:hover {
    box-shadow: 0 7px 22px rgba(57, 32, 22, 0.06);
    transform: none;
  }

  .module-card:hover .module-image::before {
    filter: none;
    transform: scale(1.001);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .landing-slide.is-active,
  .module-image::before {
    transform: none;
  }

  .reveal-line {
    opacity: 1;
  }
}
