:root{--rsg-ink: #172033;--rsg-muted: #5f6b7c;--rsg-line: #dce2ea;--rsg-paper: #ffffff;--rsg-soft: #f4f7fa;--rsg-night: #18243a;--rsg-night-2: #243452;--rsg-amber: #f4a340;--rsg-amber-dark: #d77b15;--rsg-blue: #2f6fed;--rsg-green: #16866d;--rsg-shadow: 0 22px 55px rgba(23,32,51,.12);--primary: var(--rsg-blue);--primary-dark: #1f54bd;--border: var(--rsg-line);--surface: var(--rsg-paper);--shadow-soft: 0 12px 34px rgba(23,32,51,.09);--surface-muted: var(--rsg-soft);--text-main: var(--rsg-ink);--text-muted: var(--rsg-muted);}
.rsg-workbench{display: grid;grid-template-columns: minmax(290px,370px) minmax(0,1fr);border: 1px solid #cfd7e2;border-radius: 24px;background: var(--rsg-paper);box-shadow: var(--rsg-shadow);overflow: hidden;margin-bottom: 3.5rem;}
.rsg-controls{padding: 0 1.5rem 1.5rem;background: #fbfcfe;border-right: 1px solid var(--rsg-line);}
.rsg-author-meta{display: flex;justify-content: space-between;gap: .75rem;align-items: center;margin: 0 -1.5rem 1.5rem;padding: .78rem 1.5rem;border-bottom: 1px solid var(--rsg-line);background: #f2f5f9;font-size: .76rem;color: var(--rsg-muted);}
.rsg-meta-author{font-weight: 700;}
.rsg-meta-author .author-link{color: var(--rsg-blue);text-decoration: none;}
.rsg-meta-author .author-link:hover{text-decoration: underline;}
.rsg-meta-author .author-link:focus-visible{outline: 2px solid var(--rsg-blue);outline-offset: 3px;border-radius: 3px;}
.rsg-meta-updated{white-space: nowrap;}
.rsg-panel-heading{margin-bottom: 1.35rem;}
.rsg-panel-heading h2,.rsg-output-head h2{font-size: 1.42rem;font-weight: 800;letter-spacing: -.025em;margin: .25rem 0 .4rem;color: var(--rsg-ink);}
.rsg-panel-heading p{font-size: .88rem;line-height: 1.55;color: var(--rsg-muted);margin: 0;}
.rsg-kicker,.rsg-section-tag{display: inline-block;color: var(--rsg-amber-dark);font-size: .72rem;font-weight: 800;letter-spacing: .14em;text-transform: uppercase;}
.rsg-field{margin-bottom: 1rem;}
.rsg-field label,.rsg-pressure legend{display: block;font-size: .82rem;font-weight: 800;color: var(--rsg-ink);margin-bottom: .45rem;}
.rsg-field select{width: 100%;border: 1px solid #cbd4e0;background: #fff;color: var(--rsg-ink);border-radius: 10px;padding: .78rem 2.5rem .78rem .9rem;font-size: .92rem;appearance: none;background-image: linear-gradient(45deg,transparent 50%,#637083 50%),linear-gradient(135deg,#637083 50%,transparent 50%);background-position: calc(100% - 17px) 50%,calc(100% - 12px) 50%;background-size: 5px 5px,5px 5px;background-repeat: no-repeat;}
.rsg-field select:hover{border-color: #97a6b9;}
.rsg-field select:focus-visible{outline: 3px solid rgba(47,111,237,.2);border-color: var(--rsg-blue);}
.rsg-pressure{border: 0;padding: 0;margin: 0 0 1rem;}
.rsg-segments{display: grid;grid-template-columns: repeat(3,1fr);padding: 4px;border: 1px solid #cbd4e0;border-radius: 11px;background: #eef2f7;}
.rsg-segments label{margin: 0;cursor: pointer;}
.rsg-segments input{position: absolute;opacity: 0;pointer-events: none;}
.rsg-segments span{display: block;text-align: center;padding: .58rem .35rem;border-radius: 7px;color: var(--rsg-muted);font-size: .78rem;font-weight: 800;}
.rsg-segments input:checked + span{background: #fff;color: var(--rsg-blue);box-shadow: 0 2px 8px rgba(23,32,51,.1);}
.rsg-segments input:focus-visible + span{outline: 2px solid var(--rsg-blue);outline-offset: 1px;}
.rsg-pressure > p{font-size: .74rem;line-height: 1.45;color: var(--rsg-muted);margin: .45rem 0 0;}
.rsg-check{display: flex;gap: .7rem;align-items: flex-start;padding: .8rem;border: 1px solid var(--rsg-line);border-radius: 10px;background: #fff;cursor: pointer;margin-bottom: 1.25rem;}
.rsg-check input{margin-top: .18rem;width: 1rem;height: 1rem;accent-color: var(--rsg-blue);flex: 0 0 auto;}
.rsg-check span{display: grid;gap: .15rem;}
.rsg-check strong{font-size: .82rem;}
.rsg-check small{color: var(--rsg-muted);font-size: .73rem;line-height: 1.4;}
.rsg-actions{display: grid;gap: .6rem;}
.rsg-actions button,.rsg-output-actions button{border: 0;border-radius: 10px;padding: .78rem 1rem;font-size: .84rem;font-weight: 800;cursor: pointer;transition: transform .18s ease,box-shadow .18s ease,background .18s ease;}
.rsg-primary{background: var(--rsg-blue);color: #fff;box-shadow: 0 8px 18px rgba(47,111,237,.23);}
.rsg-primary:hover{background: #255fcf;transform: translateY(-1px);}
.rsg-primary:disabled,.rsg-secondary:disabled,.rsg-output-actions button:disabled{opacity: .72;cursor: wait;transform: none;}
.rsg-output.is-loading .rsg-scene{opacity: .48;}
.rsg-status.is-wait{color: var(--rsg-muted);font-weight: 700;}
.rsg-status.is-error{color: #b42318;}
.rsg-secondary{background: #e9eef5;color: #46546a;}
.rsg-secondary:hover{background: #dce4ee;}
.rsg-actions button:focus-visible,.rsg-output-actions button:focus-visible{outline: 3px solid rgba(47,111,237,.26);outline-offset: 2px;}
.rsg-output{padding: clamp(1.5rem,4vw,2.75rem);background: radial-gradient(circle at 90% 0,rgba(244,163,64,.12),transparent 32%),#fff;display: flex;flex-direction: column;min-width: 0;}
.rsg-output-head{display: flex;align-items: flex-start;justify-content: space-between;gap: 1rem;padding-bottom: 1rem;border-bottom: 1px solid var(--rsg-line);}
.rsg-count{background: #edf2fb;color: var(--rsg-blue);border-radius: 99px;padding: .35rem .7rem;font-size: .72rem;font-weight: 800;white-space: nowrap;}
.rsg-scene{padding: 1.6rem 0 1rem;flex: 1;}
.rsg-prompt{font-family: Georgia,"Times New Roman",serif;font-size: clamp(1.35rem,3vw,2rem);line-height: 1.38;color: var(--rsg-night);margin: 0 0 1.6rem;max-width: 820px;}
.rsg-brief{display: grid;grid-template-columns: repeat(2,minmax(0,1fr));gap: 0;margin: 0;border: 1px solid var(--rsg-line);border-radius: 14px;overflow: hidden;background: rgba(255,255,255,.82);}
.rsg-brief div{padding: .9rem 1rem;border-bottom: 1px solid var(--rsg-line);}
.rsg-brief div:nth-child(odd){border-right: 1px solid var(--rsg-line);}
.rsg-brief div:nth-last-child(-n+2){border-bottom: 0;}
.rsg-brief dt{font-size: .69rem;letter-spacing: .09em;text-transform: uppercase;font-weight: 800;color: #768397;margin-bottom: .32rem;}
.rsg-brief dt i{color: var(--rsg-amber-dark);width: 1.1rem;}
.rsg-brief dd{font-size: .89rem;line-height: 1.5;color: #334157;margin: 0;}
.rsg-opening{margin: 1rem 0 0;padding: 1rem 1.2rem;border-left: 4px solid var(--rsg-amber);background: #fff8ec;border-radius: 0 10px 10px 0;}
.rsg-opening span{display: block;font-size: .65rem;letter-spacing: .12em;text-transform: uppercase;color: #9a651e;font-weight: 800;margin-bottom: .3rem;}
.rsg-opening p{font-family: Georgia,"Times New Roman",serif;color: #3a3024;font-size: 1.05rem;line-height: 1.55;margin: 0;}
.rsg-output-actions{display: flex;gap: .65rem;padding-top: 1rem;border-top: 1px solid var(--rsg-line);}
.rsg-output-actions button{background: var(--rsg-night);color: #fff;}
.rsg-output-actions button + button{background: #edf1f6;color: #3e4c61;}
.rsg-output-actions button:hover{transform: translateY(-1px);box-shadow: 0 7px 16px rgba(23,32,51,.13);}
.rsg-status{min-height: 1.2em;margin: .65rem 0 0;color: var(--rsg-green);font-size: .76rem;font-weight: 800;}
.rsg-article{margin: 0 auto;}
.rsg-lead{font-family: Georgia,"Times New Roman",serif;font-size: clamp(1.25rem,2.4vw,1.6rem);line-height: 1.65;color: #26344a;margin: 0 0 2.5rem;}
.rsg-note{display: grid;grid-template-columns: auto 1fr;gap: 1.2rem;align-items: start;padding: clamp(1.3rem,3vw,2rem);background: var(--rsg-night);color: #fff;border-radius: 18px;margin-bottom: 4rem;box-shadow: var(--rsg-shadow);}
.rsg-note-mark{display: grid;place-items: center;width: 2.5rem;height: 2.5rem;border-radius: 50%;background: var(--rsg-amber);color: var(--rsg-night);font-size: 1.25rem;font-weight: 900;}
.rsg-note h2{font-size: clamp(1.25rem,2.6vw,1.75rem);margin: 0 0 .55rem;color: #fff;}
.rsg-note p{color: #dce5f2;line-height: 1.7;margin: 0;}
.rsg-copy-section{margin-bottom: 4.25rem;}
.rsg-copy-section h2,.rsg-draft-lab h2,.rsg-limit h2{font-size: clamp(1.7rem,4vw,2.55rem);line-height: 1.12;letter-spacing: -.035em;color: var(--rsg-ink);margin: .55rem 0 1.25rem;}
.rsg-copy-section > p{font-size: 1rem;line-height: 1.8;color: #485569;}
.rsg-copy-section a,.rsg-limit a{color: #215cc8;font-weight: 700;text-decoration-thickness: 1px;text-underline-offset: 3px;}
.rsg-anatomy{display: grid;grid-template-columns: repeat(4,1fr);gap: .8rem;margin-top: 2rem;}
.rsg-anatomy > div{background: #fff;border: 1px solid var(--rsg-line);border-radius: 14px;padding: 1.15rem;box-shadow: 0 8px 22px rgba(23,32,51,.05);}
.rsg-anatomy span{color: var(--rsg-amber-dark);font-size: .7rem;font-weight: 900;letter-spacing: .1em;}
.rsg-anatomy h3{font-size: 1rem;margin: .55rem 0 .4rem;}
.rsg-anatomy p{color: var(--rsg-muted);font-size: .82rem;line-height: 1.55;margin: 0;}
.rsg-table-wrap{overflow-x: auto;border: 1px solid var(--rsg-line);border-radius: 14px;background: #fff;margin-top: 1.5rem;}
.rsg-table{width: 100%;border-collapse: collapse;min-width: 690px;}
.rsg-table th{background: #e9eef5;color: #334158;text-align: left;font-size: .74rem;text-transform: uppercase;letter-spacing: .07em;padding: .85rem 1rem;}
.rsg-table td{padding: 1rem;font-size: .86rem;line-height: 1.55;color: #4c596c;border-top: 1px solid var(--rsg-line);vertical-align: top;}
.rsg-table td:nth-child(2){color: var(--rsg-ink);font-weight: 700;}
.rsg-draft-lab{display: grid;grid-template-columns: minmax(0,1.6fr) minmax(220px,.7fr);gap: 2rem;background: #fff;border: 1px solid var(--rsg-line);border-radius: 20px;padding: clamp(1.4rem,4vw,2.6rem);margin-bottom: 4.25rem;box-shadow: 0 14px 36px rgba(23,32,51,.07);}
.rsg-draft-copy > p{line-height: 1.75;color: #4b586b;}
.rsg-steps{padding: 0;list-style: none;counter-reset: rsg-step;margin: 1.5rem 0 0;}
.rsg-steps li{position: relative;padding: .85rem 0 .85rem 2rem;border-top: 1px solid var(--rsg-line);color: #4a576a;line-height: 1.6;}
.rsg-steps li::before{counter-increment: rsg-step;content: counter(rsg-step);position: absolute;left: 0;top: .95rem;width: 1.3rem;height: 1.3rem;display: grid;place-items: center;background: var(--rsg-night);color: #fff;border-radius: 50%;font-size: .64rem;font-weight: 800;}
.rsg-margin-note{align-self: start;background: #fff7e8;border: 1px solid #f1d49f;border-radius: 12px;padding: 1.2rem;transform: rotate(1deg);}
.rsg-margin-note span{font-size: .67rem;text-transform: uppercase;letter-spacing: .12em;color: #95611f;font-weight: 900;}
.rsg-margin-note p{font-family: Georgia,"Times New Roman",serif;line-height: 1.65;color: #4c3b27;margin: .65rem 0 0;}
.rsg-decisions{list-style: none;padding: 0;margin: 1.5rem 0;display: grid;grid-template-columns: repeat(2,minmax(0,1fr));gap: .8rem;}
.rsg-decisions li{background: #fff;border-left: 3px solid var(--rsg-blue);padding: 1rem 1.1rem;border-radius: 0 10px 10px 0;color: #4d596b;line-height: 1.6;box-shadow: 0 7px 20px rgba(23,32,51,.05);}
.rsg-limit{display: grid;grid-template-columns: minmax(240px,.7fr) minmax(0,1.3fr);gap: clamp(2rem,6vw,5rem);padding: clamp(1.5rem,4vw,3rem);margin-bottom: 4.25rem;background: #e9edf2;border-radius: 20px;}
.rsg-limit h2{margin-bottom: 0;}
.rsg-limit p{color: #465367;line-height: 1.78;margin: 0 0 1rem;}
.rsg-privacy{padding-left: clamp(1rem,5vw,4rem);border-left: 6px solid var(--rsg-green);}
@media (max-width: 991px){.rsg-workbench{grid-template-columns: 1fr;}.rsg-controls{border-right: 0;border-bottom: 1px solid var(--rsg-line);}.rsg-anatomy{grid-template-columns: repeat(2,1fr);}.rsg-draft-lab{grid-template-columns: 1fr;}.rsg-margin-note{transform: none;max-width: 560px;}.rsg-limit{grid-template-columns: 1fr;gap: 1rem;}}
@media (max-width: 767px){.tool-hero{border-radius: 18px;padding: 1.4rem;}.rsg-workbench{border-radius: 16px;}.rsg-author-meta{align-items: flex-start;flex-direction: column;}.rsg-brief{grid-template-columns: 1fr;}.rsg-brief div,.rsg-brief div:nth-child(odd),.rsg-brief div:nth-last-child(-n+2){border-right: 0;border-bottom: 1px solid var(--rsg-line);}.rsg-brief div:last-child{border-bottom: 0;}.rsg-output-actions{flex-direction: column;}.rsg-output-actions button{width: 100%;}.rsg-anatomy,.rsg-decisions{grid-template-columns: 1fr;}.rsg-note{grid-template-columns: 1fr;}.rsg-copy-section,.rsg-draft-lab,.rsg-limit{margin-bottom: 3rem;}}
@media (max-width: 480px){.rsg-controls{padding: 0 1rem 1rem;}.rsg-author-meta{margin: 0 -1rem 1.25rem;padding: .75rem 1rem;}.rsg-output{padding: 1.15rem;}.rsg-prompt{font-size: 1.25rem;}.rsg-segments span{font-size: .72rem;padding: .55rem .2rem;}}
@media (prefers-reduced-motion: reduce){.rsg-actions button,.rsg-output-actions button{transition: none;}}
