:root {
    --demo-deep: #123b36;
    --demo-mint: #dff4ef;
    --demo-soft: #f4f8f7;
    --demo-line: #d5e4e1;
    --demo-text: #17312d;
    --demo-muted: #647773;
}

.wd-demo-body { min-width: 0; color: var(--demo-text); background: linear-gradient(180deg, #edf7f4 0, #f8fafc 420px); }
.wd-demo-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid rgba(18,59,54,.12); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.wd-demo-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--demo-deep); text-decoration: none; }
.wd-demo-brand:hover { color: var(--demo-deep); text-decoration: none; }
.wd-demo-brand > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--demo-deep); color: #fff; font-weight: 900; }
.wd-demo-topbar .btn { min-height: 44px; }
.wd-demo-shell { width: min(1180px, 100%); margin: 0 auto; padding: 18px 12px 40px; }
.wd-demo-hero { display: grid; gap: 20px; padding: 22px 4px 24px; }
.wd-demo-hero h1 { max-width: 790px; margin: 6px 0 10px; font-size: clamp(2rem, 8vw, 4.7rem); line-height: .98; letter-spacing: -.055em; color: var(--demo-deep); }
.wd-demo-hero p { max-width: 670px; margin: 0; color: #49635e; font-size: 1.05rem; }
.wd-demo-kicker,.wd-demo-eyebrow { color: #147568; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.wd-demo-safety { display: grid; gap: 3px; align-self: end; padding: 13px 15px; border: 1px solid #aadbd1; border-radius: 14px; background: rgba(255,255,255,.75); }
.wd-demo-safety span { color: var(--demo-muted); font-size: .8rem; }
.wd-demo-nav { position: sticky; z-index: 15; top: 64px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px,1fr); gap: 7px; margin: 0 -12px 16px; padding: 9px 12px; overflow-x: auto; border-block: 1px solid var(--demo-line); background: rgba(244,248,247,.96); scrollbar-width: thin; }
.wd-demo-nav button,.wd-demo-view-tabs button,.wd-demo-detail-tabs button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--demo-line); border-radius: 999px; background: #fff; color: #38534f; font-weight: 750; white-space: nowrap; }
.wd-demo-nav button.is-active,.wd-demo-view-tabs button.is-active,.wd-demo-detail-tabs button.is-active { border-color: var(--demo-deep); background: var(--demo-deep); color: #fff; }
.wd-demo-screen { scroll-margin-top: 130px; min-width: 0; padding: 17px 14px; border: 1px solid var(--demo-line); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 22px 60px rgba(20,61,55,.08); }
.wd-demo-screen-usp { border-color: #7dd3fc; box-shadow: 0 24px 70px rgba(14,116,144,.16); }
.wd-demo-screen:focus { outline: none; }
.wd-demo-section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.wd-demo-section-head h2,.wd-demo-next h2 { margin: 3px 0 5px; color: var(--demo-deep); font-size: clamp(1.55rem, 5vw, 2.45rem); letter-spacing: -.035em; }
.wd-demo-section-head p,.wd-demo-next p { max-width: 700px; margin: 0; color: var(--demo-muted); }
.wd-demo-section-head time { color: var(--demo-muted); font-weight: 700; }
.wd-demo-badge { display: inline-flex; align-items: center; width: max-content; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: #edf2f1; color: #526965; font-size: .72rem; font-weight: 800; }
.wd-demo-badge.is-red { background: #fee2e2; color: #991b1b; }
.wd-demo-badge.is-blue { background: #dbeafe; color: #1e40af; }
.wd-demo-badge.is-green { background: #dcfce7; color: #166534; }
.wd-demo-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 15px; }
.wd-demo-metrics article { display: grid; gap: 1px; min-width: 0; padding: 12px; border-radius: 14px; background: var(--demo-soft); }
.wd-demo-metrics strong { color: var(--demo-deep); font-size: 1.65rem; line-height: 1; }
.wd-demo-metrics span { color: var(--demo-muted); font-size: .75rem; overflow-wrap: anywhere; }
.wd-demo-task-list { display: grid; gap: 10px; }
.wd-demo-task { display: grid; gap: 13px; padding: 13px; border: 1px solid var(--demo-line); border-left: 5px solid #94a3b8; border-radius: 15px; background: #fff; }
.wd-demo-task.is-priority { border-left-color: #dc2626; }
.wd-demo-task.is-review { border-left-color: #2563eb; }
.wd-demo-task-copy { min-width: 0; }
.wd-demo-task h3 { margin: 7px 0 4px; font-size: 1.03rem; overflow-wrap: anywhere; }
.wd-demo-task p { margin: 0; color: var(--demo-muted); font-size: .88rem; }
.wd-demo-task .btn { width: 100%; align-self: center; min-height: 46px; white-space: normal; }
.wd-demo-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.wd-demo-reasons span { padding: 4px 7px; border-radius: 7px; background: #f1f5f9; color: #475569; font-size: .72rem; }
.wd-demo-work-focus { display: grid; gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid #99f6e4; border-radius: 15px; background: linear-gradient(145deg,#ecfdf5,#fff); }
.wd-demo-work-focus > div { display: grid; gap: 2px; }
.wd-demo-work-focus span { color: #0f766e; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.wd-demo-work-focus strong { font-size: 1.08rem; }
.wd-demo-wound-grid,.wd-demo-photo-grid { display: grid; gap: 12px; }
.wd-demo-photo-flow { display: grid; gap: 9px; margin: 0 0 14px; }
.wd-demo-photo-flow article { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 2px 10px; align-items: center; min-width: 0; padding: 11px; border: 1px solid #bae6fd; border-radius: 13px; background: #f0f9ff; }
.wd-demo-photo-flow span { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #0e7490; color: #fff; font-weight: 900; }
.wd-demo-photo-flow strong { color: #164e63; }
.wd-demo-photo-flow small { color: #49635e; }
.wd-demo-panel { min-width: 0; padding: 13px; border: 1px solid var(--demo-line); border-radius: 15px; background: #fff; }
.wd-demo-panel-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 11px; }
.wd-demo-panel-head h3 { margin: 2px 0 0; font-size: 1.12rem; }
.wd-demo-view-tabs,.wd-demo-detail-tabs { display: flex; gap: 7px; margin-bottom: 10px; overflow-x: auto; }
.wd-demo-body-map,.wd-demo-detail-map { position: relative; width: min(100%,300px); height: 340px; margin: 0 auto; overflow: hidden; border-radius: 16px; background: radial-gradient(circle at 50% 28%,#fff,#f0f6f4); }
.wd-demo-body-map svg,.wd-demo-detail-map svg { display: block; width: 100%; height: 100%; }
.wd-demo-body-map .wd-body-shape,.wd-demo-detail-map .wd-detail-base { fill: #e5eeec; stroke: #78918c; }
.wd-demo-body-map .wd-rl-label,.wd-demo-detail-map text { fill: #526965; }
.wd-demo-detail-map .wd-region-zone { fill: rgba(20,117,104,.08); stroke: rgba(20,117,104,.22); }
.wd-demo-marker { position: absolute; display: block; width: 18px; height: 18px; border: 4px solid #fff; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.28),0 4px 10px rgba(15,23,42,.3); }
.wd-demo-marker.is-ankle { right: 32%; bottom: 8%; }
.wd-demo-marker.is-detail-ankle { right: 22%; top: 34%; }
.wd-demo-position-result { display: grid; gap: 2px; margin-top: 10px; padding: 10px 12px; border-radius: 11px; background: #ecfdf5; color: #166534; }
.wd-demo-position-result span,.wd-demo-hint { color: var(--demo-muted); font-size: .8rem; }
.wd-demo-hint { margin: 10px 0 0; }
.wd-demo-timeline { display: grid; gap: 0; margin-top: 13px; }
.wd-demo-timeline article { position: relative; display: grid; gap: 2px; padding: 2px 4px 18px 28px; border-left: 2px solid var(--demo-line); }
.wd-demo-timeline article::before { position: absolute; top: 2px; left: -7px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #7b948f; box-shadow: 0 0 0 2px #7b948f; content: ''; }
.wd-demo-timeline article.is-current::before { background: #0d9488; box-shadow: 0 0 0 2px #0d9488; }
.wd-demo-timeline time,.wd-demo-timeline span { color: var(--demo-muted); font-size: .78rem; }
.wd-demo-photo-stage { position: relative; min-height: 340px; overflow: hidden; border-radius: 18px; background: radial-gradient(circle at 48% 50%,#b76d69 0 11%,#c98e83 12% 20%,#d8aa9f 21% 35%,#dcb8ad 36% 62%,#bf9186 100%); }
.wd-demo-wound-shape { position: absolute; top: 34%; left: 31%; width: 39%; height: 31%; border-radius: 48% 42% 55% 40%; background: radial-gradient(ellipse at 52% 45%,#6f171f,#9d2730 48%,#d15f60 76%,rgba(209,95,96,.15) 78%); transform: rotate(-8deg); }
.wd-demo-contour { position: absolute; top: 31%; left: 28%; width: 45%; height: 37%; border: 3px dashed #fef08a; border-radius: 48% 42% 55% 40%; transform: rotate(-8deg); }
.wd-demo-ruler { position: absolute; z-index: 2; top: 18px; left: 18px; display: grid; grid-template-columns: repeat(4,1fr); width: min(230px,70%); padding: 7px 9px; border-radius: 6px; background: #fffdf5; color: #111827; box-shadow: 0 5px 14px rgba(15,23,42,.25); font-size: .7rem; }
.wd-demo-ruler span { border-left: 1px solid #111827; padding-left: 3px; }
.wd-demo-photo-label { position: absolute; right: 10px; bottom: 10px; left: 10px; padding: 6px 8px; border-radius: 8px; background: rgba(15,23,42,.75); color: #fff; font-size: .7rem; text-align: center; }
.wd-demo-assistant-cards { display: grid; gap: 8px; }
.wd-demo-assistant-cards article { display: grid; gap: 2px; padding: 11px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.wd-demo-assistant-cards article.is-open { border-color: #fde68a; background: #fffbeb; }
.wd-demo-assistant-cards span,.wd-demo-assistant-cards small { color: var(--demo-muted); font-size: .75rem; }
.wd-demo-review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.wd-demo-review-grid article { display: grid; min-width: 0; gap: 2px; padding: 11px; border-radius: 12px; background: var(--demo-soft); }
.wd-demo-review-grid span,.wd-demo-review-grid small { color: var(--demo-muted); font-size: .7rem; overflow-wrap: anywhere; }
.wd-demo-review-grid strong { font-size: 1.08rem; }
.wd-demo-callout { display: grid; gap: 3px; margin-top: 12px; padding: 12px; border-left: 4px solid #0d9488; border-radius: 10px; background: #ecfdf5; }
.wd-demo-callout.is-neutral { border-left-color: #64748b; background: #f8fafc; }
.wd-demo-callout span { color: var(--demo-muted); font-size: .8rem; }
.wd-demo-supply-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.wd-demo-supply-wound { display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid var(--demo-line); border-radius: 13px; }
.wd-demo-supply-wound.is-selected { border-color: #86efac; background: #f0fdf4; }
.wd-demo-supply-wound > div { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.wd-demo-supply-wound > div > div { display: grid; min-width: 0; }
.wd-demo-supply-wound small { color: var(--demo-muted); overflow-wrap: anywhere; }
.wd-demo-check { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #16a34a; color: #fff; font-weight: 900; }
.wd-demo-table-wrap { overflow-x: auto; border: 1px solid var(--demo-line); border-radius: 11px; }
.wd-demo-table { width: 100%; min-width: 690px; border-collapse: collapse; }
.wd-demo-table th,.wd-demo-table td { padding: 10px; border-bottom: 1px solid var(--demo-line); text-align: left; vertical-align: top; }
.wd-demo-table th { background: var(--demo-soft); color: #536d68; font-size: .72rem; text-transform: uppercase; }
.wd-demo-table td:first-child { display: grid; }
.wd-demo-table small { color: var(--demo-muted); }
.wd-demo-next { display: grid; gap: 15px; margin-top: 18px; padding: 20px 16px; border-radius: 20px; background: var(--demo-deep); color: #fff; }
.wd-demo-next h2,.wd-demo-next .wd-demo-eyebrow { color: #fff; }
.wd-demo-next p { color: #c9ddd9; }
.wd-demo-next .btn { width: 100%; align-self: center; background: #fff; color: var(--demo-deep); border-color: #fff; }
.wd-demo-footer { padding: 18px 12px 30px; color: var(--demo-muted); font-size: .75rem; text-align: center; }

@media (min-width: 640px) {
    .wd-demo-shell { padding-inline: 18px; }
    .wd-demo-nav { margin-inline: 0; border: 1px solid var(--demo-line); border-radius: 16px; }
    .wd-demo-screen { padding: 22px; }
    .wd-demo-section-head,.wd-demo-panel-head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
    .wd-demo-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .wd-demo-task { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
    .wd-demo-task .btn { width: auto; max-width: 230px; }
    .wd-demo-work-focus { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
    .wd-demo-photo-flow { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .wd-demo-photo-flow article { grid-template-columns: 34px minmax(0,1fr); align-content: start; }
    .wd-demo-review-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .wd-demo-supply-wound { flex-direction: row; align-items: center; justify-content: space-between; }
    .wd-demo-next { grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 26px; }
    .wd-demo-next .btn { width: auto; }
}

@media (min-width: 860px) {
    .wd-demo-topbar { padding-inline: max(20px,calc((100vw - 1180px)/2)); }
    .wd-demo-hero { grid-template-columns: minmax(0,1fr) 330px; align-items: end; padding-block: 48px 36px; }
    .wd-demo-wound-grid,.wd-demo-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .wd-demo-supply-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .wd-demo-screen { scroll-behavior: auto; }
}
