/* Closed-circle UI, 2026-10-28. Owns entry, home, modal action rows and error feedback.
   Imported after legacy presentation. Keep new components here rather than adding
   overrides to legacy-base.css. Permissions and availability remain server-owned. */
:root{--ux-ink:#294e43;--ux-paper:#f8f9f5;--ux-line:#dce5db;--ux-tint:#edf2e9}
.operation-error{padding:16px 20px;border:1px solid #bd8277;border-left:4px solid #a44b3d;background:#fff6f3;color:#80392e;border-radius:8px;font-size:16px;line-height:1.7;margin:16px 0;overflow-wrap:anywhere}
.operation-error:focus{outline:2px solid #a44b3d;outline-offset:3px}
#modal .modal-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:24px}
#modal .modal-actions>.button{flex:0 1 auto;min-height:48px;height:auto;margin:0;white-space:normal}
#modal .modal-actions>.text-button{flex:0 0 auto;min-height:48px}
#modal .modal-title,#share-flow h2{padding-right:48px}
.reader-edit,.reader-sharing,.next-save,.story-conversation{border-radius:0}
.reader-primary-actions{gap:12px;flex-wrap:wrap}
.reader-primary-actions .button{min-height:48px}
.story-cover h2{overflow-wrap:normal;word-break:normal;text-wrap:balance}
.invite-link-details textarea{width:100%;max-width:100%;overflow-wrap:anywhere;word-break:break-all}
.reviewed-people .people-tabs{display:flex;gap:8px;margin-block:24px}
.reviewed-people .people-tabs button{flex:1 1 0;min-width:0;min-height:48px;white-space:normal}
.reviewed-people .people-tabs button[aria-pressed=true]{background:var(--ux-ink);color:white;border-radius:9px}
.reviewed-people .empty .button{display:inline-flex;margin-top:16px}
.empty-line-art{display:block;width:100px;height:76px;object-fit:contain;mix-blend-mode:normal}
.empty .empty-line-art{margin:16px auto 0}
.writing-page .writing-block [contenteditable=true]{border:1px solid var(--ux-line);background:#fff;border-radius:8px;min-height:140px;padding:16px;outline-offset:3px}
.writing-page .writing-block [contenteditable=true]:focus{outline:2px solid var(--ux-ink)}
.writing-page .block-heading [contenteditable=true]{min-height:64px}
.draft-row{min-width:0;gap:16px}.draft-row-copy{min-width:0;overflow-wrap:anywhere}.draft-row strong{white-space:normal}.draft-row>.button{flex-shrink:0}
/* Home is a calm working surface. The same container width applies to discovery. */
body[data-page=home] #main,body[data-page=discover] #main{max-width:1200px;margin-inline:auto}
.closed-home{max-width:1040px;margin-inline:auto}
.closed-home .home-switcher{margin-bottom:24px}
.closed-home .today-prompt{margin-top:0;display:flex;align-items:center;justify-content:space-between;gap:24px}
.closed-home .today-prompt h2{font:500 26px/1.7 var(--serif);margin:12px 0}
.closed-home .prompt-actions{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.closed-home .draft-resume{display:flex;align-items:center;gap:24px;border:1px solid var(--ux-line);background:#fff;padding:28px;border-radius:16px;margin:0 0 24px}
.closed-home .draft-copy{flex:1;min-width:0;display:block}
.closed-home .draft-copy h2{font:500 26px/1.6 var(--serif);margin:10px 0;overflow-wrap:anywhere}
.closed-home .draft-copy p{margin:0;color:var(--muted)}
.closed-home .draft-resume>img{width:100px;height:80px;object-fit:cover;border-radius:8px}
.closed-home .ux-focus{border-left:4px solid var(--ux-ink)}
.closed-home .renewed-arrivals,.closed-home .renewed-recent{margin-top:36px}
.closed-home .renewed-arrivals.ux-focus{margin:0 0 24px;padding:24px;border-radius:16px;background:#fff;border:1px solid var(--ux-line);border-left:4px solid var(--ux-ink)}
.closed-home .section-top h2{font-size:20px}
.closed-home .quiet-empty{display:flex;gap:24px;align-items:center;justify-content:flex-start;padding:24px;background:var(--ux-paper);border-radius:12px;text-align:left}
.closed-home .quiet-empty p{margin:0 0 8px}
.home-welcome{display:flex;gap:24px;align-items:center;margin:0 0 24px}.home-welcome>img{width:130px;height:110px;object-fit:contain;mix-blend-mode:normal}.home-welcome h2{font:500 25px/1.6 var(--serif);margin:0 0 8px}.home-welcome p{color:var(--muted);margin:0}
.home-book-link{display:flex;gap:24px;align-items:center;margin:40px 0 16px;padding:24px;border-top:1px solid var(--ux-line);border-bottom:1px solid var(--ux-line);text-decoration:none;color:var(--ux-ink)}
.home-book-link>img{width:100px;height:76px;object-fit:contain;mix-blend-mode:normal}.home-book-link>span:nth-child(2){flex:1}.home-book-link strong{display:block;font:500 20px/1.6 var(--serif)}.home-book-link small{display:block;margin-top:6px;font-size:14px;color:var(--muted)}
.home-public-management{text-align:right}
/* Editorial entry: illustration communicates the relationship; real record
   examples communicate the product. No simulated messaging bubbles. */
.entry-story{color:var(--ux-ink);background:white}
.entry-story p{font-size:16px;line-height:1.9;color:#596370}
.entry-story h1,.entry-story h2,.entry-story h3,.entry-story h4{font-family:var(--serif);font-weight:500;letter-spacing:.055em;color:var(--ux-ink)}
.entry-story h2{font-size:32px;line-height:1.7;margin:0 0 20px}.entry-story h3{font-size:19px;line-height:1.7;margin:0 0 18px}.entry-story h4{font-size:23px;line-height:1.7;margin:16px 0}
.entry-story small{font-size:13px;line-height:1.8;color:#596370}
.entry-nav{max-width:1440px;margin:auto;min-height:100px;padding:20px 36px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9edf1;gap:24px}
.entry-nav nav{display:flex;align-items:center;gap:28px}
.entry-hero,.entry-experience{max-width:1200px;margin:auto;padding:72px 0}
.entry-hero{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center;min-height:590px}
.entry-hero h1{font-size:44px;line-height:1.65;margin:28px 0}
.entry-hero .entry-tagline{font-family:var(--serif);font-size:23px;color:var(--ux-ink)}
.entry-hero .eyebrow,.entry-experience .eyebrow{font-size:13px;color:#596370}
.entry-generations{width:100%;height:auto;object-fit:contain}
.entry-actions{display:flex;gap:12px;margin:24px 0}.entry-actions .button{min-width:150px;min-height:48px}
.entry-experience>p{margin:0 0 28px}.entry-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:36px;margin-top:44px}.entry-steps h3 span{margin-right:10px}
.entry-example{border:1px solid var(--ux-line);border-radius:12px;padding:24px;background:var(--ux-paper)}
.entry-example p{font-size:15px;margin:0}.entry-example hr{border:0;border-top:1px solid var(--ux-line);margin:20px 0}.example-question{background:var(--ux-tint)}
.example-record img{display:block;width:100%;aspect-ratio:2.4;object-fit:cover;object-position:center 76%;border-radius:5px;margin:14px 0}
.example-library ul{list-style:none;padding:0;margin:14px 0 0}.example-library li{border-top:1px solid var(--ux-line);padding:16px 0;font-family:var(--serif);font-size:16px;line-height:1.8}.example-library li small{display:block;margin-bottom:10px;font-family:var(--sans)}
.entry-steps>article>p{font-size:15px;margin:16px 0}.example-disclaimer{display:block;margin-top:36px}
.entry-privacy,.entry-book-section{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:center;padding:64px max(32px,calc((100% - 1200px)/2));background:var(--ux-paper)}
.entry-privacy>div>img{width:140px;height:100px;object-fit:contain;mix-blend-mode:normal;margin-bottom:20px}.entry-privacy-example{background:white;border:1px solid var(--ux-line);padding:28px;border-radius:16px}.entry-privacy-example h3{font-size:19px}.privacy-selected{display:block;border-radius:24px;padding:10px 16px;background:var(--ux-tint);font-size:14px}.entry-privacy-example p{border-top:1px solid var(--ux-line);padding-top:20px;font-size:16px}
.entry-book-section{background:var(--ux-tint)}.entry-book-section>img{width:100%;max-height:330px;object-fit:contain;mix-blend-mode:normal}.entry-book-section .button{margin-top:12px}
.signed-out #main.has-entry-story:not(.code-entry) .login-layout{display:block;max-width:1200px;margin:auto;min-height:0;padding:64px 0;background:white}
#main.has-entry-story:not(.code-entry) .login-intro{display:none}
#main.has-entry-story:not(.code-entry) .login-layout>.login-card{width:100%;max-width:520px;margin:0 auto;padding:32px;border:1px solid var(--ux-line);border-radius:16px;background:#fff}
#main.has-entry-story .login-card h2{display:block;font:500 28px/1.6 var(--serif)}
#main.has-entry-story .login-card>.helper{display:block;margin-bottom:24px}
#main.has-entry-story .login-card #send-code{margin-top:20px}
#main.code-entry .entry-story{display:none}
#main.code-entry .login-layout>.login-card{max-width:520px!important;width:100%!important;margin:64px auto 0!important}
#main.code-entry .login-layout{padding-inline:24px!important}
#entry-login,#entry-experience,#entry-book{scroll-margin-top:24px}
@media(max-width:1250px){.entry-hero,.entry-experience{padding-inline:40px}.entry-privacy,.entry-book-section{gap:40px;padding-inline:40px}}
@media(max-width:1099px){
 body:has(dialog[open]) .mobile-nav,body.writing-page .mobile-nav{display:none!important}
 body:has(dialog[open]) .sidebar{visibility:hidden}
 .mobile-nav a{font-size:12px!important;line-height:1.4}.mobile-nav a>span:last-child{white-space:normal;font-size:12px}
 #modal{padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
 #modal .modal-actions{flex-direction:column;align-items:stretch}
 #modal .modal-actions>.button,#modal .modal-actions>.text-button{flex:0 0 auto;width:100%;min-height:48px}
 .closed-home .today-prompt{display:block}.closed-home .prompt-actions{flex-direction:row;align-items:center;flex-wrap:wrap}.closed-home .today-prompt h2{font-size:24px}
 .closed-home .draft-resume{flex-wrap:wrap;padding:20px;gap:16px}.closed-home .draft-copy{flex-basis:70%}.closed-home .draft-copy h2{font-size:23px}.closed-home .draft-resume>.button{width:100%}.closed-home .draft-resume>img{width:60px;height:60px}
 .closed-home .renewed-arrivals.ux-focus{padding:20px}.closed-home .quiet-empty{padding:20px;gap:16px}.closed-home .quiet-empty .empty-line-art{width:70px;height:64px}
 .home-welcome{gap:12px}.home-welcome>img{width:84px}.home-welcome h2{font-size:21px}.home-welcome p{font-size:14px}
 .home-book-link{padding:20px 0;gap:16px}.home-book-link>img{width:72px}.home-book-link strong{font-size:19px}
 .draft-row{display:grid;grid-template-columns:minmax(0,1fr) auto}.draft-row>img{grid-column:1/-1}.draft-row-copy small{display:block}
 .entry-nav{padding:16px 24px;min-height:80px}.entry-nav nav{gap:16px}.entry-nav nav>.text-button{display:none}
 .entry-hero{gap:24px}.entry-hero h1{font-size:36px}.entry-hero .entry-tagline{font-size:20px}
 .entry-steps{gap:20px}.entry-example{padding:20px}
}
@media(max-width:700px){
 .entry-hero{display:flex;flex-direction:column;align-items:stretch;padding:40px 24px 32px;gap:12px;min-height:0}
 .entry-hero h1{font-size:32px;line-height:1.7;margin:20px 0}.entry-hero .entry-tagline{font-size:18px;line-height:1.8}.entry-hero p{font-size:15px}.entry-actions .button{flex:1;min-width:0;padding-inline:12px}.entry-hero small{font-size:12px}
 .entry-generations{max-height:300px;align-self:center;object-fit:contain}.entry-experience{padding:48px 24px}.entry-story h2{font-size:26px;line-height:1.7}.entry-experience>p{font-size:15px}.entry-steps{grid-template-columns:1fr;gap:32px;margin-top:32px}.entry-story h3{font-size:19px}.entry-example{padding:24px}.entry-example h4{font-size:23px}.entry-steps>article>p{font-size:15px}.entry-privacy,.entry-book-section{grid-template-columns:1fr;gap:24px;padding:40px 24px}.entry-privacy p,.entry-book-section p{font-size:15px}.entry-privacy-example{padding:24px}.entry-book-section>img{max-height:230px}.entry-book-section h2{font-size:26px}.entry-story .button{min-height:48px}
 .signed-out #main.has-entry-story:not(.code-entry) .login-layout{padding:40px 24px}.signed-out #main.has-entry-story:not(.code-entry) .login-layout>.login-card{padding:24px 20px}.entry-nav .brand-word{font-size:20px}
 .writing-page .writing-block [contenteditable=true]{padding:12px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Save completion has one reading action, followed by optional sharing. */
#modal .saved-story{display:flex;flex-direction:column;gap:20px}
#modal .saved-story>.eyebrow{display:block;order:0;margin:0}
#modal .saved-story>.modal-title{order:1;margin:0;font:500 28px/1.6 var(--serif)}
#modal .saved-story>.notice{order:2;margin:0;width:100%;padding:16px;border-radius:10px}
#modal .saved-story>.saved-preview{order:3;margin:0;padding:16px 0;border-block:1px solid var(--ux-line)}
#modal .saved-story>.saved-preview p{margin:0 0 10px;font-size:20px}
#modal .saved-story>.saved-preview blockquote{margin:0;font-size:16px;line-height:1.8}
#modal .saved-story>.modal-actions{order:4;margin:0;padding:0;background:transparent;display:flex;flex-wrap:wrap}
#modal .saved-story>.modal-actions>button{width:auto}
#modal .saved-story>.next-save{order:5;border:0;margin:0;padding:0}
@media(max-width:1099px){#modal .saved-story>.modal-actions>button{width:100%}#modal .saved-story>.modal-title{font-size:24px}}

.closed-home .prompt-actions>.text-button{background:transparent;border:0;width:auto;min-width:0;flex:0 0 auto;padding:8px 0;white-space:nowrap;font-size:14px}
.closed-home .recent-grid .integrated-story-row{min-height:0;height:auto;padding:20px 0;margin:0}
.closed-home .recent-grid{gap:24px}
#modal .saved-preview{border-radius:0}
.entry-story .entry-hero h1{font-size:52px;line-height:1.5;letter-spacing:.4px}
.entry-story .entry-steps{grid-template-columns:344fr 432fr 344fr;gap:40px}
@media(max-width:1099px){.entry-story .entry-hero h1{font-size:36px}.entry-story .entry-steps{gap:20px}}
@media(max-width:700px){.entry-story .entry-hero h1{font-size:32px}.entry-story .entry-steps{grid-template-columns:1fr;gap:32px}.closed-home .recent-grid{gap:0}.closed-home .recent-grid .integrated-story-row{border-bottom:1px solid var(--ux-line)}}
.review-questions .design-question-row{box-shadow:0 2px 0 #e9edf1,0 5px 16px #25344906}
@media(max-width:1099px){
 .review-questions>header h1{display:none}
 .archive-view .library-toolbar{height:auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
 .archive-view .library-toolbar>.button{width:100%;white-space:normal;min-height:48px}
 .archive-view .library-toolbar>a[href="/book"]{grid-column:1/-1;order:3;width:auto;justify-self:start;background:transparent;border:0;padding:0;min-height:44px}
 .archive-view .library-toolbar .archive-view-switch{display:none}
 .closed-home .renewed-arrivals .integrated-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;line-height:1.8;margin:12px 0}
}

.reader-heading>.reader-bookmark{display:flex;min-height:44px;margin:12px 0 0 auto;padding:8px 0;max-width:100%;white-space:normal;background:transparent;border:0}
#birth-date-format{display:block;margin:4px 0 16px}
@media(max-width:640px){
 .journey-progress{display:block;position:relative;padding-bottom:8px;background:linear-gradient(to right,var(--ux-ink) var(--journey-progress),var(--ux-line) var(--journey-progress)) bottom/100% 3px no-repeat}
 .journey-progress>li{display:none}
 .journey-progress>li[aria-current=step]{display:flex;flex-direction:row;align-items:center;gap:12px;border:0;background:transparent;padding:8px 0}
 .journey-progress>li[aria-current=step]>span{font-size:14px;white-space:nowrap}
 .journey-progress>li[aria-current=step]>span::after{content:" / 4"}
}

/* Founder story stays discoverable without competing with the writing action. */
.entry-reason-link{display:inline-flex;align-items:center;min-height:44px;margin-top:12px;font-size:14px;color:var(--ux-ink);text-decoration:underline;text-underline-offset:5px}
.home-origin-link,.sidebar-origin{display:inline-flex;align-items:center;min-height:44px;font-size:14px;line-height:1.6;color:var(--ux-ink);text-decoration:underline;text-underline-offset:5px}
.sidebar-origin{margin:12px 0;padding:8px;font-size:13px}
@media(max-width:700px){.home-origin-link{font-size:13px}}
