/* Portrait app screens retain their original colours inside the Nordic theme. */
.habit-feature, .habit-intro { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 48px; align-items: center; }
.habit-feature { margin-block: 48px 64px; padding: clamp(24px,4vw,56px); border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(ellipse at 85% 45%,#36877733,transparent 65%),var(--panel); }
.habit-feature-copy, .habit-intro > * { min-width: 0; }
.habit-feature h3 { margin-block: 24px 16px; font-size: calc(clamp(1.5rem,3.3vw,3.2rem) * var(--display-text-scale,1)); overflow-wrap: anywhere; }
:is(.habit-feature h3,.habit-story h1) > span { color: var(--gold); }
.habit-tagline { color: var(--text); font-size: calc(1.25rem * var(--display-text-scale,1)); line-height: 1.5; margin-block: 20px; }
.habit-feature-copy > p:not(.eyebrow):not(.habit-tagline) { font-size: calc(1rem * var(--display-text-scale,1)); }
.habit-feature .button { margin-top: 28px; }
.habit-devices { margin: 0; min-width: 0; }
.habit-device-pair { display: flex; align-items: center; justify-content: center; gap: clamp(12px,2vw,28px); padding: 12px; }
.habit-device-pair > a { display: block; flex-shrink: 0; filter: drop-shadow(0 16px 22px #03170f55); }
.habit-phone { width: 58%; max-width: 248px; }
.habit-watch { width: 34%; max-width: 160px; margin-top: 20%; }
.habit-device-pair img { display: block; width: 100%; height: auto; border-radius: 28px; }
.habit-watch img { border-radius: 34px; }
.habit-devices figcaption { padding-block: 18px; text-align: center; color: var(--soft); font-size: calc(.875rem * var(--display-text-scale,1)); line-height: 1.6; }
.habit-device-pair a:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; border-radius: 24px; }
.habit-intro .project-story-header { margin-bottom: 0; }
.habit-story h1 { overflow-wrap: anywhere; }
.habit-prototype-note { margin-top: 24px; color: var(--soft); font-size: calc(.875rem * var(--display-text-scale,1)); }
.habit-story .ha-book { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); border-radius: 24px; background-image: none; box-shadow: none; }
.habit-story .ha-book::after { display: none; }
.habit-story .ha-book-page { align-items: center; }
.habit-story .ha-book-page img { width: auto; max-width: 100%; height: 480px; object-fit: contain; border: 0; border-radius: 24px; }
.habit-story .ha-chapter img, .habit-story .ha-static-gallery img { width: 100%; height: 220px; object-fit: contain; }
.habit-story .ha-chapters { grid-template-columns: repeat(5,minmax(0,1fr)); }
.habit-story .ha-dialog { width: min(94vw,1100px); }
.habit-story .ha-image-viewport { height: auto; max-height: 75dvh; }
.habit-process { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); margin-block: 48px; }
.habit-process .eyebrow { margin-bottom: 20px; }
@media (max-width: 900px) {
  .habit-feature, .habit-intro { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .habit-devices { width: 100%; max-width: 480px; margin-inline: auto; }
  .habit-story .ha-chapters { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) { .habit-story .ha-book { grid-template-columns: minmax(0,1fr); }.habit-story .ha-book-page img { height: 400px; } }
@media (max-width: 480px) {
  .habit-feature { padding: 20px; border-radius: 18px; }
  .habit-device-pair { padding: 0; gap: 10px; }
  .habit-story .ha-chapters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .habit-story .ha-chapter img, .habit-story .ha-static-gallery img { height: 180px; }
  .habit-process { padding: 20px; }
}
html[data-display-scale]:not([data-display-scale='100']) :is(.habit-feature,.habit-intro,.habit-story .ha-book) { grid-template-columns: minmax(0,1fr); }
html[data-display-scale]:not([data-display-scale='100']) .habit-story .ha-chapters { grid-template-columns: repeat(2,minmax(0,1fr)); }
html[data-display-contrast='high'] .habit-feature, html[data-display-calm='true'] .habit-feature { background: var(--panel); }
html[data-display-contrast='high'] .habit-device-pair > a { filter: none; }
@media (prefers-contrast: more) { .habit-feature { background: var(--panel); } }
@media (forced-colors: active) { .habit-feature, .habit-process { background: Canvas; }.habit-device-pair > a { filter: none; } }
