:root {
  color-scheme: light;
  --line: #c7c7c7;
  --soft-line: #e7e7e7;
  --text: #050505;
  --muted: #989898;
  --mobile-width: 430px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  background: #ffffff;
}

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, textarea { font: inherit; }
[hidden] { display: none !important; }

.prototype {
  width: min(100%, var(--mobile-width));
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3px 48px 4px;
}

.brand-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  transform: translateY(0);
}

.brand-logo__top {
  color: #9b9b9b;
  font-size: 7px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .34em;
  white-space: nowrap;
  margin: 0 0 3px 0;
}

.brand-logo__main {
  display: inline-block;
  padding: 2px 5px 3px;
  background: #e6e6e6;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: .9;
  letter-spacing: .025em;
  white-space: nowrap;
}

.share-button {
  position: absolute;
  top: 3px;
  right: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
}
.share-button:active { background: #f6f6f6; }

.card-stage { width: 100%; }

.wisdom-card {
  height: clamp(330px, 47dvh, 390px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 25px 10px 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-content {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px 8px;
  transition: opacity 150ms ease, transform 150ms ease;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.card-content.is-leaving {
  opacity: 0;
  transform: translateY(3px);
}

.card-kicker {
  min-height: 19px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}
.card-kicker:empty { display: none; }

.card-text {
  max-width: 100%;
  margin: 0;
  font-size: clamp(27px, 7.5vw, 31px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  white-space: pre-line;
}

.wisdom-card.is-intro .card-text {
  font-size: clamp(38px, 11vw, 44px);
  font-weight: 600;
  line-height: 1.08;
}

.navigation {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
}
.navigation.has-back { grid-template-columns: 1fr 1fr; }

.nav-button {
  min-height: 31px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: rgba(255,255,255,.94);
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-button:active { background: #f7f7f7; }
.nav-button:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.nav-button--back { display: none; }
.navigation.has-back .nav-button--back { display: block; }

.dialogue {
  flex: 1 1 auto;
  min-height: 178px;
  margin-top: 8px;
  background: #ffffff;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.dialogue-text {
  width: 100%;
  margin: 0;
  padding: 18px 12px;
  border: 0;
  border-radius: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialogue-exchange {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.user-line,
.ai-response {
  margin: 0;
  color: var(--text);
  font-weight: 400;
}

.user-line {
  width: min(82%, 340px);
  margin-left: auto;
  padding: 7px 2px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
  text-align: right;
}

.ai-box {
  width: 100%;
  min-height: 112px;
  padding: 16px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #ffffff;
}
.ai-response { font-size: 16px; line-height: 1.34; }

.composer {
  width: 100%;
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 8px;
  align-items: end;
}

.composer-field { position: relative; min-height: 48px; }

.composer-input {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 96px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  outline: none;
  font-size: 16px;
  line-height: 1.35;
}
.composer-input:focus { border-color: #777777; }
.composer-input:disabled { color: transparent; caret-color: transparent; }

.voice-status {
  position: absolute;
  inset: 1px;
  border-radius: 9px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: #555555;
  font-size: 14px;
}
.voice-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555555;
  animation: pulse 1.1s infinite ease-in-out;
}
.voice-status__wave {
  height: 22px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}
.voice-status__wave i {
  width: 2px;
  height: 7px;
  background: #8a8a8a;
  animation: wave 900ms infinite ease-in-out;
}
.voice-status__wave i:nth-child(2) { animation-delay: 100ms; }
.voice-status__wave i:nth-child(3) { animation-delay: 200ms; }
.voice-status__wave i:nth-child(4) { animation-delay: 300ms; }
.voice-status__wave i:nth-child(5) { animation-delay: 400ms; }

.composer-button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.composer-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-stop { display: none; fill: currentColor; stroke: none !important; }
.composer.is-recording .icon-mic { display: none; }
.composer.is-recording .icon-stop {
  display: block;
  width: 16px;
  height: 16px;
  color: #ffffff;
  fill: #ffffff !important;
  stroke: none !important;
}
.composer.is-recording .icon-stop rect { fill: #ffffff !important; }
.composer.is-recording #voice-button {
  background: #5d5d5d;
  border-color: #5d5d5d;
}
.composer-button:active { background: #f7f7f7; }
.composer-button:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.composer-button--send:disabled { opacity: .35; cursor: default; }

@keyframes wave {
  0%, 100% { height: 6px; opacity: .45; }
  50% { height: 20px; opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(.8); opacity: .45; }
  50% { transform: scale(1.2); opacity: 1; }
}

@media (min-width: 431px) {
  body { display: flex; justify-content: center; align-items: flex-start; }
  .prototype { min-height: 100dvh; }
}

/* Prototype 10: spacing, save icons, and long-answer experiments */
.topbar {
  min-height: 45px;
  padding-bottom: 0;
}
.card-stage { margin-top: -10px; }

.share-button {
  top: 0;
  right: 1px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777777;
  display: grid;
  place-items: center;
}
.share-button:hover { color: #222222; background: transparent; }
.share-button:active { color: #000000; transform: translateY(1px); }
.share-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dialogue {
  min-height: 0;
  align-items: flex-start;
}
.dialogue-text {
  min-height: 178px;
}
.dialogue-exchange {
  gap: 0;
  padding: 8px 12px 2px;
}
.user-line {
  width: min(88%, 350px);
  padding: 5px 0 10px;
}
.ai-box {
  min-height: 0;
  padding: 15px 0 6px;
  border: 0;
  border-top: 1px solid var(--soft-line);
  border-radius: 0;
}
.ai-response {
  font-size: 16px;
  line-height: 1.42;
  white-space: pre-line;
}

/* Variant A: all content participates in ordinary page scrolling. */
body[data-layout="natural"] .prototype {
  min-height: 100dvh;
}
body[data-layout="natural"] .composer {
  position: static;
}

/* Variant B: the composer stays available while the answer grows. */
body[data-layout="sticky"] .prototype {
  min-height: 100dvh;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}
body[data-layout="sticky"] .composer {
  position: sticky;
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 20;
  margin-top: 12px;
  padding: 6px 0;
  background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 18px rgba(255,255,255,.92);
  backdrop-filter: blur(5px);
}

/* Prototype 11: open-sided banner and conversation anchored to page bottom. */
.wisdom-card {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

/* Prototype 12: soften the banner boundaries. */
.wisdom-card {
  position: relative;
  border-top-color: #ffffff;
  border-bottom: 0;
}

.wisdom-card::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: var(--soft-line);
  pointer-events: none;
}

/* Prototype 14: visually center the text together with the navigation area. */
.card-content {
  transform: translateY(-16px);
}

.card-content.is-leaving {
  transform: translateY(-13px);
}

/* Prototype 15: light menu, expandable user message, and saveable AI response. */
.menu-button {
  position: absolute;
  top: 2px;
  left: 1px;
  width: 34px;
  height: 34px;
  padding: 8px 7px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777777;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-icon {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}
.menu-button:active {
  color: #000000;
  transform: translateY(1px);
}

.user-line-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 5px 0 10px;
}
.user-line {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}
.user-line.is-expanded {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.user-open-button,
.save-response-button {
  border: 0;
  background: transparent;
  color: #9b9b9b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.user-open-button {
  padding: 4px 0 4px 6px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .08em;
  white-space: nowrap;
}
.user-open-button:active,
.save-response-button:active { color: #333333; }

.ai-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.save-response-button {
  align-self: flex-end;
  margin: 7px 0 0;
  padding: 3px 0;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .08em;
}
.save-response-button.is-saved { color: #737373; }


/* Prototype 17: inline copy action and final header alignment. */
.menu-button {
  top: -6px;
}

.ai-box {
  display: block;
}

.ai-response {
  display: inline;
}

.save-response-button {
  display: inline;
  margin: 0 0 0 .55em;
  padding: 0;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Real OpenAI request state for the lab prototype. */
.composer.is-thinking {
  opacity: 0.78;
}

.ai-response.is-pending {
  color: #8f8f8f;
}

/* Continuous pension conversation */
.dialogue { display: block; min-height: 0; margin-top: 8px; }
.dialogue-history { width: 100%; display: flex; flex-direction: column; gap: 0; }
.message { width: 100%; border-top: 1px solid var(--soft-line); padding: 14px 12px; }
.message p { margin: 0; font-size: 16px; line-height: 1.4; white-space: pre-wrap; }
.message--user { padding-left: 42px; text-align: right; }
.message--user p { font-size: 14px; }
.message--assistant { text-align: left; }
.dialogue-options { display: grid; gap: 8px; padding: 12px 0 4px; }
.answer-option { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d7d7d7; border-radius: 7px; background: #fff; color: var(--text); font-size: 15px; line-height: 1.25; cursor: pointer; }
.answer-option:active { background: #f5f5f5; }
.answer-option:disabled { opacity: .55; cursor: default; }
.composer[hidden] { display: none !important; }

/* Header and navigation are provided by the shared DVAG shell. */
.topbar{display:none!important}.prototype{padding-top:10px}

/* DVAG pension page layout: mobile-first continuous flow. */
:root {
  --pension-flow-width: 760px;
  --pension-chat-width: 660px;
}

body {
  display: block !important;
  min-width: 0;
  overflow-x: hidden;
}

.prototype {
  width: min(100%, var(--pension-flow-width));
  min-height: auto;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: block;
}

.card-stage {
  width: 100%;
  margin: 0;
}

.wisdom-card {
  width: 100%;
  height: auto;
  min-height: 410px;
  padding: 34px 18px 16px;
  border-top: 0;
  background: #fff;
}

.card-content {
  width: min(100%, 680px);
  min-height: 315px;
  margin: 0 auto;
  padding: 0 18px 24px;
  transform: none;
}

.card-content.is-leaving {
  transform: translateY(3px);
}

.card-kicker {
  margin-bottom: 22px;
  font-size: 14px;
}

.card-text {
  max-width: 680px;
  font-size: clamp(18px, 3vw, 29px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.wisdom-card.is-intro .card-text {
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.02;
}

.navigation {
  width: min(100%, var(--pension-chat-width));
  margin: 0 auto;
}

.nav-button {
  min-height: 38px;
  height: 38px;
  font-size: 15px;
}

.dialogue,
.composer {
  width: min(100%, var(--pension-chat-width));
  margin-left: auto;
  margin-right: auto;
}

.dialogue {
  margin-top: 14px;
}

.dialogue-history {
  width: 100%;
}

.message {
  padding: 16px 10px;
}

.message p {
  font-size: 17px;
  line-height: 1.45;
}

.message--user {
  padding-left: 22%;
}

.message--user p {
  font-size: 15px;
}

.dialogue-options {
  padding: 14px 0 6px;
}

.answer-option {
  min-height: 46px;
  font-size: 16px;
}

.composer {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .prototype {
    width: 100%;
    padding: 8px 10px 28px;
  }

  .wisdom-card {
    min-height: 365px;
    padding: 24px 4px 12px;
  }

  .card-content {
    min-height: 278px;
    padding: 0 8px 18px;
  }

  .card-kicker {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .card-text {
    font-size: clamp(15px, 4.5vw, 20px);
    line-height: 1.06;
  }

  .wisdom-card.is-intro .card-text {
    font-size: clamp(18px, 6vw, 24px);
    line-height: 1.02;
  }

  .navigation {
    gap: 7px;
  }

  .nav-button {
    min-height: 36px;
    height: 36px;
    font-size: 14px;
  }

  .dialogue {
    margin-top: 8px;
  }

  .message {
    padding: 14px 6px;
  }

  .message p {
    font-size: 16px;
  }

  .message--user {
    padding-left: 16%;
  }

  .message--user p {
    font-size: 14px;
  }

  .answer-option {
    min-height: 44px;
    font-size: 15px;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    gap: 7px;
  }
}

@media (max-width: 390px) {
  .prototype {
    padding-inline: 8px;
  }

  .wisdom-card {
    min-height: 345px;
  }

  .card-content {
    min-height: 260px;
  }

  .card-text {
    font-size: clamp(14px, 4.4vw, 18px);
  }

  .wisdom-card.is-intro .card-text {
    font-size: clamp(17px, 5.75vw, 22px);
  }
}


/* Real horizontal card track: the card follows the finger before settling. */
.card-content {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  padding-left: 0;
  padding-right: 0;
  will-change: transform;
}

.card-content.is-dragging {
  cursor: grabbing;
}

.card-track {
  display: flex;
  width: 100%;
  min-height: inherit;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.card-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  min-height: inherit;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
}

.card-slide__inner {
  width: 100%;
  min-height: inherit;
  padding: 0 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.card-slide__inner.is-intro .card-text {
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.02;
}

@media (max-width: 760px) {
  .card-slide__inner {
    padding: 0 8px 18px;
  }

  .card-slide__inner.is-intro .card-text {
    font-size: clamp(18px, 6vw, 24px);
  }
}

@media (max-width: 390px) {
  .card-slide__inner.is-intro .card-text {
    font-size: clamp(17px, 5.75vw, 22px);
  }
}
