/* Claude at Home: animated device prototype */
.chd { max-width: var(--media, 60rem); margin: 2rem auto 0; }
.chd-stage { position: relative; background: #ECE5DA; border-radius: 20px; padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2.5rem); overflow: hidden; }
.chd-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: #D9CBB6; z-index: 0; }
.chd-device { position: relative; z-index: 1; width: min(100%, 40rem); margin: 0 auto; }

.chd-screen { position: relative; aspect-ratio: 16 / 10; background: #2B2A28; border-radius: clamp(14px, 3vw, 26px); padding: clamp(6px, 1.4vw, 12px); box-shadow: 0 18px 30px rgba(50, 38, 24, 0.22); }
.chd-display { position: relative; height: 100%; border-radius: clamp(8px, 2vw, 16px); background: #181816; color: #F4EFE7; overflow: hidden; font-size: clamp(9px, 1.9vw, 15px); }

.chd-base { position: relative; height: clamp(54px, 12vw, 92px); margin: -6px 6% 0; border-radius: 26px 26px 48px 48px; background-color: #CDBFAE; background-image: radial-gradient(rgba(80, 64, 46, 0.22) 1px, transparent 1.4px); background-size: 5px 5px; box-shadow: inset 0 -10px 18px rgba(70, 52, 34, 0.18), 0 14px 22px rgba(70, 52, 34, 0.18); }
.chd-strip { position: absolute; left: 6%; right: 6%; top: 0; height: 4px; border-radius: 4px; background: #E8DED0; transition: background 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease; }
.chd-mark { position: absolute; left: 50%; top: 52%; width: clamp(18px, 3.4vw, 28px); height: clamp(18px, 3.4vw, 28px); transform: translate(-50%, -50%); color: #D9773F; }
.chd-switch { position: absolute; right: 7%; top: 44%; width: clamp(22px, 4vw, 34px); height: clamp(10px, 1.8vw, 14px); border-radius: 8px; background: #8F8372; }

/* Light strip states */
.chd[data-light="listening"] .chd-strip { background: #F39A5C; box-shadow: 0 0 14px 3px rgba(243, 154, 92, 0.75); }
.chd[data-light="window"] .chd-strip { background: #F39A5C; opacity: 0.55; box-shadow: 0 0 8px 1px rgba(243, 154, 92, 0.4); }
.chd[data-light="thinking"] .chd-strip { background: linear-gradient(90deg, #E8DED0 0%, #F39A5C 50%, #E8DED0 100%); background-size: 200% 100%; animation: chd-sweep 1.4s linear infinite; }
@keyframes chd-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Scenes */
.chd-scene { position: absolute; inset: 0; padding: 6% 6.5% 0; display: flex; flex-direction: column; gap: 0.8em; opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease, transform 0.45s ease; pointer-events: none; }
.chd-scene.is-on { opacity: 1; transform: none; }
.chd-bar { position: absolute; left: 6.5%; right: 6.5%; bottom: 0; height: 13%; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #34322E; color: #C9C1B5; font-size: 0.85em; }
.chd-bar b { font-weight: 600; color: #F4EFE7; }
.chd-dot { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: #6E685F; margin-right: 0.45em; vertical-align: middle; }
.chd[data-light="listening"] .chd-dot, .chd[data-light="window"] .chd-dot { background: #F39A5C; }

.chd-kicker { font-size: 0.85em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #F39A5C; }
.chd-muted { color: #C9C1B5; }
.chd-big { font-size: 2.1em; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
.chd-huge { font-size: 4.2em; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.chd-row { display: flex; gap: 0.8em; }
.chd-card { flex: 1; background: #26241F; border-radius: 0.9em; padding: 0.9em 1em; display: flex; flex-direction: column; gap: 0.25em; }
.chd-card.is-light { background: #F4EFE7; color: #1B1A17; }
.chd-card.is-light .chd-muted { color: #5B554C; }
.chd-said { font-size: 1.6em; line-height: 1.3; }
.chd-said::after { content: ""; display: inline-block; width: 2px; height: 1em; background: #F39A5C; margin-left: 2px; vertical-align: -0.12em; animation: chd-blink 0.9s steps(1) infinite; }
.chd-said.is-done::after { display: none; }
@keyframes chd-blink { 50% { opacity: 0; } }
.chd-claude { font-size: 1.6em; line-height: 1.3; color: #F4EFE7; }
.chd-who { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.85em; color: #C9C1B5; }
.chd-steps { display: flex; flex-direction: column; gap: 0.55em; margin-top: 0.2em; }
.chd-step { display: flex; align-items: center; gap: 0.7em; font-size: 1.05em; color: #C9C1B5; }
.chd-step i { width: 0.9em; height: 0.9em; border-radius: 50%; border: 2px solid #6E685F; flex-shrink: 0; }
.chd-step.is-done { color: #F4EFE7; }
.chd-step.is-done i { background: #F4EFE7; border-color: #F4EFE7; }
.chd-step.is-active { color: #F4EFE7; font-weight: 600; }
.chd-step.is-active i { border-color: #F39A5C; border-top-color: transparent; animation: chd-spin 0.9s linear infinite; }
@keyframes chd-spin { to { transform: rotate(360deg); } }
.chd-timer { align-self: flex-start; display: inline-flex; gap: 0.5em; align-items: center; background: #26241F; border-radius: 999px; padding: 0.35em 0.9em; font-variant-numeric: tabular-nums; }
.chd-tag { align-self: flex-start; font-size: 0.8em; font-weight: 600; background: #F39A5C; color: #1B1A17; border-radius: 999px; padding: 0.2em 0.7em; }
.chd-swap { background: rgba(243, 154, 92, 0.18); border-radius: 0.3em; padding: 0 0.2em; }

/* Caption and controls */
.chd-under { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1rem; }
.chd-caption { margin: 0; flex: 1 1 18rem; min-height: 3.2em; color: var(--ink-soft, #3D4A43); }
.chd-caption strong { color: var(--ink, #13211A); }
.chd-controls { display: flex; align-items: center; gap: 0.75rem; }
.chd-dots { display: flex; gap: 0.15rem; }
.chd-dots button { width: 28px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.chd-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #C9C6BD; transition: background 0.2s ease, transform 0.2s ease; }
.chd-dots button[aria-current="step"]::before { background: var(--forest, #112E4B); transform: scale(1.3); }
.chd-play { min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--rule, #E3E1DA); background: #fff; color: var(--forest, #112E4B); font: inherit; font-weight: 600; font-size: 0.9375rem; cursor: pointer; }
.chd-play:hover { border-color: var(--forest, #112E4B); }

@media (prefers-reduced-motion: reduce) {
  .chd-scene { transition: none; transform: none; }
  .chd[data-light="thinking"] .chd-strip { animation: none; background: #F39A5C; opacity: 0.7; }
  .chd-step.is-active i, .chd-said::after { animation: none; }
}
