:root {
    --rw-ink: #17242b;
    --rw-muted: #68777a;
    --rw-line: #dce2df;
    --rw-paper: #fffefa;
    --rw-canvas: #f1eee7;
    --rw-accent: #dd765b;
    --rw-accent-dark: #a94e38;
    --rw-accent-soft: #fbebe5;
    --rw-sage: #2f746a;
    --rw-sage-soft: #e5f0ed;
    --rw-blue: #4b6572;
    --rw-warning: #9b6821;
    --rw-warning-soft: #fff6dc;
    --rw-danger: #a94442;
    --rw-shadow: 0 22px 60px rgba(35, 47, 46, 0.12);
}

.rw-page {
    background:
        radial-gradient(circle at 10% 14%, rgba(221, 118, 91, 0.08), transparent 25rem),
        linear-gradient(180deg, #f8f7f3 0, #efede7 100%);
}

.rw-main.container {
    width: 90em;
    max-width: calc(100% - 3em);
    padding-bottom: 3em !important;
}

#main > header.rw-hero {
    max-width: 840px;
    margin: 0 auto 2.4em;
}

#main > header.rw-hero h2 {
    color: var(--rw-ink);
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.045em;
    line-height: 1.02;
    margin: 0.18em 0 0;
}

#main > header.rw-hero p {
    border: 0;
    color: var(--rw-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 1.1rem auto 0;
    max-width: 690px;
    padding: 0;
}

.rw-eyebrow,
.rw-pane-kicker {
    color: var(--rw-accent-dark);
    display: block;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.3;
    text-transform: uppercase;
}

.rw-app {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(33, 52, 52, 0.13);
    border-radius: 22px;
    box-shadow: var(--rw-shadow);
    color: var(--rw-muted);
    min-height: 650px;
    overflow: hidden;
}

.rw-app h3,
.rw-app h4,
.rw-app strong,
.rw-dialog h3 {
    color: var(--rw-ink);
}

.rw-app h3,
.rw-app h4,
.rw-dialog h3,
.rw-app p,
.rw-dialog p {
    margin: 0;
}

.rw-topbar {
    align-items: center;
    background: rgba(255, 254, 250, 0.94);
    border-bottom: 1px solid var(--rw-line);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    min-height: 76px;
    padding: 0.8rem 1.25rem;
    position: relative;
    z-index: 4;
}

.rw-brand-mark {
    align-items: center;
    background: var(--rw-ink);
    border-radius: 12px 12px 12px 4px;
    color: white;
    display: flex;
    font-family: Georgia, serif;
    font-size: 1.2rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.rw-topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.rw-topbar-title strong {
    font-size: 1rem;
    font-weight: 600;
}

.rw-topbar-title span {
    color: var(--rw-muted);
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rw-topbar-actions,
.rw-export-controls,
.rw-turn-actions,
.rw-dialog-actions,
.rw-answer-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rw-save-status {
    bottom: 0.1rem;
    color: var(--rw-muted);
    font-size: 0.68rem;
    line-height: 1;
    min-height: 1em;
    position: absolute;
    right: 1.4rem;
}

.rw-button,
.rw-icon-button,
.rw-text-button,
.rw-mobile-tabs button,
.rw-copy-popover button,
.rw-block-action,
.rw-project-action {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.rw-button {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    line-height: 1.2;
    min-height: 40px;
    padding: 0.6rem 0.9rem;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rw-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.rw-button:disabled,
.rw-icon-button:disabled,
.rw-text-button:disabled,
.rw-block-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.rw-button-primary {
    background: var(--rw-accent-dark);
    color: #fff;
}

.rw-button-primary:hover:not(:disabled) {
    background: #843a2a;
}

.rw-button-quiet {
    background: #fff;
    border: 1px solid var(--rw-line);
    color: var(--rw-ink);
}

.rw-button-quiet:hover:not(:disabled) {
    background: #f8f6f1;
    border-color: #c5cfca;
}

.rw-button-large {
    font-size: 0.9rem;
    min-height: 52px;
    padding: 0.8rem 1.4rem;
}

.rw-text-button {
    background: transparent;
    border-bottom: 1px solid currentColor;
    color: var(--rw-accent-dark);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0;
}

.rw-button:focus-visible,
.rw-icon-button:focus-visible,
.rw-text-button:focus-visible,
.rw-mobile-tabs button:focus-visible,
.rw-copy-popover button:focus-visible,
.rw-block-action:focus-visible,
.rw-project-action:focus-visible,
.rw-dropzone:focus-within,
.rw-agent-option input:focus-visible + .rw-agent-card,
.rw-segmented input:focus-visible + span {
    outline: 3px solid rgba(221, 118, 91, 0.3);
    outline-offset: 2px;
}

.rw-onboarding {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(250, 248, 242, 0.95)),
        var(--rw-paper);
    padding: clamp(1.4rem, 3vw, 3.2rem);
}

.rw-setup-intro {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rw-setup-intro h3 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.rw-setup-intro p {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.rw-step-number {
    align-items: center;
    border: 1px solid var(--rw-accent);
    border-radius: 50%;
    color: var(--rw-accent-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    height: 46px;
    justify-content: center;
    letter-spacing: 0.08em;
    width: 46px;
}

.rw-step-number-small {
    height: 34px;
    margin-bottom: 0.8rem;
    width: 34px;
}

.rw-setup-grid {
    display: grid;
    gap: 1.5rem 2rem;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
}

.rw-setup-main {
    display: grid;
    gap: 0.75rem;
}

.rw-label {
    color: var(--rw-ink);
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.rw-app textarea,
.rw-dialog textarea {
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 12px;
    color: var(--rw-ink);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.55;
    padding: 0.85rem 1rem;
    resize: vertical;
}

.rw-app textarea::placeholder,
.rw-dialog textarea::placeholder {
    color: #97a09f;
    opacity: 1;
}

.rw-app textarea:focus,
.rw-dialog textarea:focus {
    border-color: var(--rw-accent);
    box-shadow: 0 0 0 3px rgba(221, 118, 91, 0.15);
}

.rw-choice-fieldset {
    border: 0;
    margin: 0.45rem 0 0;
    padding: 0;
}

.rw-choice-fieldset legend {
    margin-bottom: 0.6rem;
}

.rw-segmented {
    background: #eeeae2;
    border-radius: 11px;
    display: inline-grid;
    gap: 3px;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    padding: 3px;
}

.rw-segmented label,
.rw-agent-option {
    cursor: pointer;
    margin: 0;
    position: relative;
}

.rw-segmented input,
.rw-agent-option input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.rw-segmented span {
    border-radius: 8px;
    color: var(--rw-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.42rem 1rem;
    text-align: center;
}

.rw-segmented input:checked + span {
    background: #fff;
    box-shadow: 0 2px 7px rgba(33, 45, 43, 0.09);
    color: var(--rw-ink);
}

.rw-agent-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rw-agent-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 13px;
    display: flex;
    gap: 0.75rem;
    height: 100%;
    padding: 0.8rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.rw-agent-option:hover .rw-agent-card {
    border-color: #b8c5bf;
    transform: translateY(-1px);
}

.rw-agent-option input:checked + .rw-agent-card {
    border-color: var(--rw-accent);
    box-shadow: inset 0 0 0 1px var(--rw-accent), 0 5px 15px rgba(221, 118, 91, 0.09);
}

.rw-agent-card > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rw-agent-card strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.rw-agent-card small {
    color: var(--rw-muted);
    font-size: 0.68rem;
    line-height: 1.35;
    margin-top: 0.18rem;
}

.rw-agent-icon {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.9rem;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.rw-agent-icon-strategy {
    background: var(--rw-sage-soft);
    color: var(--rw-sage);
}

.rw-agent-icon-rapid {
    background: var(--rw-accent-soft);
    color: var(--rw-accent-dark);
}

.rw-source-panel {
    align-self: stretch;
    background: #f3f0e9;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
}

.rw-source-panel h4 {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.rw-source-panel p {
    font-size: 0.75rem;
    line-height: 1.45;
}

.rw-dropzone {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed #aebbb5;
    border-radius: 14px;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 210px;
    padding: 1.2rem;
    text-align: center;
    transition: background 160ms ease, border-color 160ms ease;
}

.rw-dropzone.is-dragging {
    background: var(--rw-accent-soft);
    border-color: var(--rw-accent);
}

.rw-drop-icon {
    color: var(--rw-sage);
    font-size: 1.65rem;
    margin-bottom: 0.7rem;
}

.rw-dropzone > span:not(.rw-drop-icon) {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.rw-dropzone small {
    color: #84908d;
    display: block;
    font-size: 0.65rem;
    line-height: 1.4;
    margin-top: 0.65rem;
}

.rw-upload-list {
    display: grid;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rw-upload-item {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 10px;
    display: grid;
    font-size: 0.7rem;
    gap: 0.5rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    line-height: 1.3;
    padding: 0.55rem 0.65rem;
}

.rw-upload-item .rw-upload-name {
    color: var(--rw-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rw-upload-item small {
    display: block;
    font-size: 0.62rem;
}

.rw-upload-remove {
    background: transparent;
    border: 0;
    color: var(--rw-muted);
    cursor: pointer;
    padding: 0.2rem;
}

.rw-upload-item[data-status="ready"] > .icon {
    color: var(--rw-sage);
}

.rw-upload-item[data-status="error"] > .icon,
.rw-form-error {
    color: var(--rw-danger);
}

.rw-start-row {
    align-items: center;
    border-top: 1px solid var(--rw-line);
    display: flex;
    gap: 1rem;
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 1.3rem;
}

.rw-form-error {
    flex: 1;
    font-size: 0.75rem;
    line-height: 1.35;
}

.rw-workspace-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.72fr) minmax(500px, 1.28fr);
    min-height: 780px;
}

.rw-coach-pane,
.rw-document-pane {
    min-width: 0;
}

.rw-coach-pane {
    background: #fffefa;
    border-right: 1px solid var(--rw-line);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.rw-pane-heading,
.rw-document-toolbar,
.rw-readiness-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.rw-pane-heading {
    border-bottom: 1px solid var(--rw-line);
    padding-bottom: 1rem;
}

.rw-pane-heading h3 {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.rw-live-dot {
    align-items: center;
    background: var(--rw-sage-soft);
    border-radius: 999px;
    color: var(--rw-sage);
    display: flex;
    font-size: 0.63rem;
    font-weight: 700;
    gap: 0.35rem;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.5rem;
}

.rw-live-dot > span {
    background: var(--rw-sage);
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.rw-conversation {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 420px;
    min-height: 180px;
    overflow-y: auto;
    padding: 1.15rem 0.2rem;
    scroll-behavior: smooth;
}

.rw-message {
    align-self: flex-start;
    max-width: 90%;
}

.rw-message[data-role="user"] {
    align-self: flex-end;
}

.rw-message-label {
    color: #87908e;
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    margin: 0 0 0.25rem 0.35rem;
    text-transform: uppercase;
}

.rw-message[data-role="user"] .rw-message-label {
    margin-left: 0;
    margin-right: 0.35rem;
    text-align: right;
}

.rw-message-bubble {
    background: #f1f0eb;
    border-radius: 4px 14px 14px 14px;
    color: var(--rw-ink);
    font-size: 0.82rem;
    line-height: 1.55;
    padding: 0.7rem 0.85rem;
    white-space: pre-wrap;
}

.rw-message[data-role="user"] .rw-message-bubble {
    background: var(--rw-ink);
    border-radius: 14px 4px 14px 14px;
    color: #fff;
}

.rw-question-empty {
    color: #8a9693;
    font-size: 0.78rem;
    padding: 1.2rem 0;
}

.rw-answer-form {
    background: #fff;
    border: 1px solid #ccd5d1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(30, 47, 44, 0.06);
    padding: 0.35rem;
}

.rw-answer-form:focus-within {
    border-color: var(--rw-accent);
    box-shadow: 0 0 0 3px rgba(221, 118, 91, 0.12);
}

.rw-answer-form textarea,
.rw-answer-form textarea:focus {
    border: 0;
    box-shadow: none;
    min-height: 92px;
    padding: 0.65rem 0.75rem;
}

.rw-answer-footer {
    justify-content: space-between;
    padding: 0 0.3rem 0.3rem 0.6rem;
}

.rw-character-count {
    color: #919a98;
    font-size: 0.62rem;
}

.rw-turn-actions {
    border-bottom: 1px solid var(--rw-line);
    justify-content: flex-start;
    padding: 0.75rem 0;
}

.rw-turn-actions .rw-button {
    min-height: 34px;
    padding: 0.45rem 0.65rem;
}

.rw-turn-actions .rw-finalize {
    margin-left: auto;
}

.rw-request-state,
.rw-retry-state {
    align-items: center;
    border-radius: 9px;
    display: flex;
    font-size: 0.7rem;
    gap: 0.55rem;
    line-height: 1.4;
    margin-top: 0.7rem;
    padding: 0.55rem 0.7rem;
}

.rw-request-state {
    background: var(--rw-sage-soft);
    color: var(--rw-sage);
}

.rw-request-state .rw-text-button {
    color: inherit;
    margin-left: auto;
}

.rw-retry-state {
    background: #fbe9e7;
    color: var(--rw-danger);
}

.rw-retry-state .rw-text-button {
    color: inherit;
    margin-left: auto;
}

.rw-spinner {
    animation: rw-spin 750ms linear infinite;
    border: 2px solid rgba(47, 116, 106, 0.22);
    border-radius: 50%;
    border-top-color: var(--rw-sage);
    display: inline-block;
    height: 15px;
    width: 15px;
}

.rw-readiness {
    background: #f5f3ed;
    border: 1px solid var(--rw-line);
    border-radius: 14px;
    margin-top: auto;
    padding: 1rem;
}

.rw-readiness-head strong {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 0.12rem;
}

.rw-readiness-orbit {
    align-items: center;
    border: 2px solid #c7cfcb;
    border-radius: 50%;
    display: flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.rw-readiness-orbit i {
    background: #9ba6a2;
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

.rw-readiness-orbit[data-status="draftable"] {
    border-color: #dda94c;
}

.rw-readiness-orbit[data-status="draftable"] i {
    background: #dda94c;
}

.rw-readiness-orbit[data-status="ready"] {
    border-color: var(--rw-sage);
}

.rw-readiness-orbit[data-status="ready"] i {
    background: var(--rw-sage);
}

.rw-readiness > p {
    font-size: 0.7rem;
    line-height: 1.45;
    margin-top: 0.6rem;
}

.rw-criteria-list,
.rw-warning-group ul {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
}

.rw-criteria-list li {
    align-items: flex-start;
    color: var(--rw-muted);
    display: grid;
    font-size: 0.66rem;
    gap: 0.4rem;
    grid-template-columns: auto 1fr;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.rw-criterion-mark {
    align-items: center;
    border: 1px solid #bbc5c0;
    border-radius: 50%;
    color: transparent;
    display: inline-flex;
    font-size: 0.55rem;
    height: 15px;
    justify-content: center;
    margin-top: 0.05rem;
    width: 15px;
}

li[data-status="satisfied"] .rw-criterion-mark {
    background: var(--rw-sage);
    border-color: var(--rw-sage);
    color: #fff;
}

li[data-status="partial"] .rw-criterion-mark {
    background: #dda94c;
    border-color: #dda94c;
    color: #fff;
}

.rw-criterion-detail {
    color: #929b98;
    display: block;
}

.rw-warning-group {
    background: var(--rw-warning-soft);
    border-radius: 9px;
    color: var(--rw-warning);
    font-size: 0.66rem;
    line-height: 1.4;
    margin-top: 0.7rem;
    padding: 0.65rem;
}

.rw-warning-group strong {
    color: inherit;
}

.rw-warning-group li + li {
    margin-top: 0.3rem;
}

.rw-document-pane {
    background: var(--rw-canvas);
    display: flex;
    flex-direction: column;
}

.rw-document-toolbar {
    background: rgba(246, 243, 236, 0.96);
    border-bottom: 1px solid #d3d6d1;
    min-height: 66px;
    padding: 0.7rem 1rem;
    position: sticky;
    top: 0;
    z-index: 3;
}

.rw-document-toolbar > div:first-child {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.rw-approval-badge {
    border-radius: 999px;
    color: var(--rw-sage);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.45rem;
}

.rw-approval-badge:not(:empty) {
    background: var(--rw-sage-soft);
}

.rw-icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 9px;
    color: var(--rw-ink);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.rw-icon-button:hover:not(:disabled) {
    background: var(--rw-accent-soft);
    border-color: #e1af9f;
    color: var(--rw-accent-dark);
}

.rw-paper-control select {
    background-color: #fff;
    border-color: var(--rw-line);
    border-radius: 9px;
    color: var(--rw-ink);
    font-size: 0.7rem;
    height: 36px;
    line-height: 1;
    min-width: 72px;
    padding: 0 2rem 0 0.65rem;
}

.rw-copy-menu {
    position: relative;
}

.rw-copy-popover {
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(24, 35, 34, 0.14);
    min-width: 150px;
    overflow: hidden;
    padding: 0.3rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 8;
}

.rw-copy-popover button {
    background: transparent;
    border-radius: 7px;
    color: var(--rw-ink);
    display: block;
    font-size: 0.72rem;
    padding: 0.45rem 0.55rem;
    text-align: left;
    width: 100%;
}

.rw-copy-popover button:hover {
    background: #f3f1eb;
}

.rw-document-stage {
    align-items: flex-start;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    overflow: auto;
    padding: clamp(1rem, 3vw, 2.2rem);
}

.rw-document-empty {
    align-self: center;
    color: #84908d;
    max-width: 350px;
    text-align: center;
}

.rw-document-empty > .icon {
    color: #aeb8b3;
    font-size: 2rem;
}

.rw-document-empty h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0.7rem 0 0.35rem;
}

.rw-document-empty p {
    font-size: 0.75rem;
    line-height: 1.5;
}

.rw-document {
    background: var(--rw-paper);
    box-shadow: 0 18px 55px rgba(34, 46, 43, 0.16);
    color: #253136;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    max-width: 100%;
    min-height: 842px;
    padding: clamp(2rem, 6vw, 4.2rem);
    position: relative;
    width: 595px;
}

.rw-document[data-paper="letter"] {
    min-height: 770px;
    width: 595px;
}

.rw-doc-header {
    border-bottom: 2px solid #253136;
    margin-bottom: 1.55rem;
    padding-bottom: 1rem;
}

.rw-doc-header h1 {
    color: #1d292f;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.35rem;
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin: 0;
}

.rw-doc-subtitle {
    color: var(--rw-accent-dark);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    margin: 0.35rem 0 0;
    text-transform: uppercase;
}

.rw-doc-contact {
    color: #5d6c70;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.65rem;
    gap: 0.2rem 0.65rem;
    margin-top: 0.7rem;
}

.rw-doc-section + .rw-doc-section {
    margin-top: 1.3rem;
}

.rw-doc-section > h2 {
    align-items: center;
    color: #253136;
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.55rem;
    letter-spacing: 0.13em;
    line-height: 1.2;
    margin: 0 0 0.6rem;
    text-transform: uppercase;
}

.rw-doc-section > h2::after {
    background: #cfd6d3;
    content: '';
    flex: 1;
    height: 1px;
}

.rw-doc-block {
    border: 1px solid transparent;
    border-radius: 6px;
    margin: -0.25rem -0.4rem 0.5rem;
    padding: 0.25rem 0.4rem;
    position: relative;
}

.rw-doc-block:hover,
.rw-doc-block:focus-within {
    background: #fffdfa;
    border-color: #e0e4e1;
}

.rw-doc-block-title {
    color: #253136;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
}

.rw-doc-block p,
.rw-doc-block ul,
.rw-doc-block dl {
    margin: 0;
}

.rw-doc-block ul {
    list-style: disc;
    padding-left: 1.1rem;
}

.rw-doc-block li + li {
    margin-top: 0.2rem;
}

.rw-doc-actions {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 8px;
    box-shadow: 0 5px 14px rgba(25, 39, 36, 0.1);
    display: flex;
    gap: 0.15rem;
    opacity: 0;
    padding: 0.18rem;
    pointer-events: none;
    position: absolute;
    right: 0.25rem;
    top: -1.9rem;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
    z-index: 2;
}

.rw-doc-block:hover .rw-doc-actions,
.rw-doc-block:focus-within .rw-doc-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.rw-block-action {
    align-items: center;
    background: transparent;
    border-radius: 5px;
    color: #536267;
    display: inline-flex;
    font-size: 0.62rem;
    gap: 0.2rem;
    line-height: 1.2;
    padding: 0.28rem 0.38rem;
}

.rw-block-action:hover:not(:disabled) {
    background: #f1f3f1;
    color: var(--rw-ink);
}

.rw-block-action[data-action="lock"][data-locked="true"] {
    color: var(--rw-sage);
}

.rw-block-editor {
    background: #f7f5ef;
    border: 1px solid #d9dedb;
    border-radius: 8px;
    padding: 0.65rem;
}

.rw-block-editor p {
    color: #6d7b7e;
    font-family: Arial, sans-serif;
    font-size: 0.62rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.rw-block-editor textarea {
    background: #fff;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    line-height: 1.45;
    min-height: 110px;
    padding: 0.5rem;
}

.rw-block-editor-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    margin-top: 0.4rem;
}

.rw-block-editor-actions .rw-button {
    font-size: 0.62rem;
    min-height: 30px;
    padding: 0.35rem 0.55rem;
}

.rw-timeline {
    display: grid;
    gap: 0.7rem;
}

.rw-timeline-item {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(70px, 0.25fr) minmax(0, 1fr);
}

.rw-timeline-period {
    color: #728084;
    font-size: 0.65rem;
    font-weight: 700;
}

.rw-timeline-copy strong {
    color: #253136;
    display: block;
    font-size: 0.75rem;
    line-height: 1.35;
}

.rw-timeline-org {
    color: #68777a;
    display: block;
    font-size: 0.67rem;
    margin: 0.05rem 0 0.2rem;
}

.rw-key-values {
    display: grid;
    gap: 0.3rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rw-key-values > div {
    display: grid;
    gap: 0.3rem;
    grid-template-columns: minmax(70px, 0.35fr) 1fr;
}

.rw-key-values dt {
    color: #68777a;
    font-weight: 700;
}

.rw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}

.rw-tags span {
    background: #edf1ef;
    border-radius: 999px;
    color: #42565b;
    font-size: 0.62rem;
    padding: 0.18rem 0.43rem;
}

.rw-link-list a {
    color: var(--rw-accent-dark);
    overflow-wrap: anywhere;
}

.rw-mobile-tabs {
    display: none;
}

.rw-dialog {
    background: #fffefa;
    border: 1px solid var(--rw-line);
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(21, 35, 33, 0.25);
    color: var(--rw-muted);
    max-height: min(760px, calc(100vh - 2rem));
    max-width: calc(100vw - 2rem);
    padding: 1.2rem;
    width: 520px;
}

.rw-dialog::backdrop {
    background: rgba(20, 31, 31, 0.55);
    backdrop-filter: blur(3px);
}

.rw-dialog-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rw-dialog h3 {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
}

.rw-dialog textarea {
    margin-top: 0.45rem;
}

.rw-dialog-actions {
    justify-content: flex-end;
    margin-top: 1rem;
}

.rw-projects-dialog {
    width: 650px;
}

.rw-project-list {
    display: grid;
    gap: 0.6rem;
    max-height: 520px;
    overflow: auto;
}

.rw-project-empty {
    background: #f5f3ed;
    border-radius: 12px;
    font-size: 0.8rem;
    padding: 2rem 1rem;
    text-align: center;
}

.rw-project-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 12px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.8rem;
}

.rw-project-card strong {
    color: var(--rw-ink);
    display: block;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rw-project-card small {
    color: #87918f;
    display: block;
    font-size: 0.65rem;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.rw-project-card-actions {
    display: flex;
    gap: 0.3rem;
}

.rw-project-action {
    background: #f4f2ec;
    border-radius: 7px;
    color: var(--rw-ink);
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
}

.rw-project-action[data-action="delete"] {
    color: var(--rw-danger);
}

.rw-toast {
    background: var(--rw-ink);
    border-radius: 10px;
    bottom: 1.25rem;
    box-shadow: 0 8px 25px rgba(22, 36, 35, 0.23);
    color: #fff;
    font-size: 0.76rem;
    left: 50%;
    line-height: 1.35;
    max-width: calc(100vw - 2rem);
    padding: 0.65rem 0.9rem;
    position: fixed;
    transform: translateX(-50%);
    z-index: 10010;
}

.rw-sr-only {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

@keyframes rw-spin {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 1050px) {
    .rw-main.container {
        max-width: calc(100% - 2em);
    }

    .rw-workspace-grid {
        grid-template-columns: minmax(310px, 0.85fr) minmax(430px, 1.15fr);
    }

    .rw-document {
        padding: 2.7rem;
    }
}

@media screen and (max-width: 840px) {
    .rw-main.container {
        max-width: 100%;
    }

    #main > header.rw-hero {
        margin-left: 1.2rem;
        margin-right: 1.2rem;
    }

    .rw-app {
        border-left: 0;
        border-radius: 0;
        border-right: 0;
    }

    .rw-setup-grid {
        grid-template-columns: 1fr;
    }

    .rw-start-row {
        grid-column: 1;
    }

    .rw-workspace-grid {
        display: block;
        min-height: 680px;
    }

    .rw-mobile-tabs {
        background: #fffefa;
        border-bottom: 1px solid var(--rw-line);
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 0.45rem;
    }

    .rw-mobile-tabs button {
        align-items: center;
        background: transparent;
        border-radius: 8px;
        color: var(--rw-muted);
        display: flex;
        font-size: 0.74rem;
        font-weight: 600;
        gap: 0.4rem;
        justify-content: center;
        padding: 0.5rem;
    }

    .rw-mobile-tabs button[aria-selected="true"] {
        background: #f0eee8;
        color: var(--rw-ink);
    }

    .rw-workspace-grid[data-mobile-view="qna"] .rw-document-pane,
    .rw-workspace-grid[data-mobile-view="document"] .rw-coach-pane {
        display: none;
    }

    .rw-coach-pane {
        border-right: 0;
        min-height: 680px;
    }

    .rw-document-pane {
        min-height: 680px;
    }

    .rw-document-stage {
        overflow-x: auto;
    }
}

@media screen and (max-width: 600px) {
    #main {
        padding-top: 2.5em;
    }

    #main > header.rw-hero h2 {
        font-size: 2.35rem;
    }

    .rw-topbar {
        grid-template-columns: auto 1fr;
        padding: 0.65rem 0.8rem 0.9rem;
    }

    .rw-brand-mark {
        height: 38px;
        width: 38px;
    }

    .rw-topbar-title span {
        display: none;
    }

    .rw-topbar-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .rw-topbar-actions .rw-button {
        flex: 1 1 auto;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .rw-save-status {
        bottom: 0.15rem;
        right: 0.8rem;
    }

    .rw-onboarding {
        padding: 1.3rem 1rem;
    }

    .rw-agent-grid {
        grid-template-columns: 1fr;
    }

    .rw-segmented {
        display: grid;
        width: 100%;
    }

    .rw-source-panel {
        padding: 1rem;
    }

    .rw-dropzone {
        min-height: 165px;
    }

    .rw-start-row {
        align-items: stretch;
        flex-direction: column;
    }

    .rw-start-row .rw-button {
        width: 100%;
    }

    .rw-coach-pane {
        padding: 1rem;
    }

    .rw-conversation {
        max-height: 340px;
    }

    .rw-turn-actions .rw-finalize {
        flex-basis: 100%;
        margin-left: 0;
    }

    .rw-document-toolbar {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .rw-document-toolbar > div:first-child {
        padding-top: 0.25rem;
    }

    .rw-export-controls {
        justify-content: flex-end;
    }

    .rw-paper-control select {
        min-width: 64px;
    }

    .rw-document-stage {
        display: block;
        padding: 0.75rem;
    }

    .rw-document {
        min-height: 730px;
        padding: 2rem 1.55rem;
        width: 100%;
    }

    .rw-doc-header h1 {
        font-size: 1.9rem;
    }

    .rw-timeline-item,
    .rw-key-values,
    .rw-key-values > div {
        grid-template-columns: 1fr;
    }

    .rw-doc-actions {
        opacity: 1;
        pointer-events: auto;
        position: static;
        transform: none;
        width: fit-content;
    }

    .rw-doc-block {
        margin-top: 0.2rem;
    }

    .rw-dialog {
        border-radius: 14px;
        padding: 1rem;
    }

    .rw-project-card {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .rw-project-card-actions .rw-project-action:first-child {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-button,
    .rw-agent-card,
    .rw-doc-actions,
    .rw-dropzone {
        transition: none;
    }

    .rw-spinner {
        animation-duration: 1.5s;
    }

    .rw-conversation {
        scroll-behavior: auto;
    }
}

@media print {
    body.rw-printing {
        background: #fff !important;
    }

    body.rw-printing #header,
    body.rw-printing #footer,
    body.rw-printing .rw-hero,
    body.rw-printing .rw-topbar,
    body.rw-printing .rw-mobile-tabs,
    body.rw-printing .rw-coach-pane,
    body.rw-printing .rw-document-toolbar,
    body.rw-printing .rw-doc-actions,
    body.rw-printing .rw-toast {
        display: none !important;
    }

    body.rw-printing #main,
    body.rw-printing .rw-main.container,
    body.rw-printing .rw-app,
    body.rw-printing .rw-workspace,
    body.rw-printing .rw-workspace-grid,
    body.rw-printing .rw-document-pane,
    body.rw-printing .rw-document-stage {
        background: #fff !important;
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        width: auto !important;
    }

    body.rw-printing .rw-document {
        box-shadow: none !important;
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    body.rw-printing .rw-doc-block {
        break-inside: avoid;
    }
}
