*{box-sizing:border-box}html,body,#app{margin:0;height:100%;overflow:hidden}body{font:13px Tahoma,Arial,sans-serif;background:#c0c0c0}button,input{font:inherit}button,a{cursor:pointer}button{color:#000;border:2px solid;border-color:#fff #555 #555 #fff;background:#c0c0c0;border-radius:0}button:active{border-color:#555 #fff #fff #555}:focus-visible{outline:1px dotted currentColor;outline-offset:3px}a,a:visited{color:var(--link);text-decoration:underline}a:hover{filter:brightness(1.2)}.browser{height:100dvh;padding:3px;display:flex;flex-direction:column}.titlebar{height:23px;display:flex;align-items:center;gap:5px;background:#000080;color:white;font:bold 12px Tahoma,Arial,sans-serif;padding:2px 4px;flex-shrink:0;user-select:none}.app-icon{font:italic bold 16px Georgia;color:#ddd}.titletext{flex:1}.windowbuttons{display:flex;gap:2px}.windowbuttons button{width:19px;height:18px;padding:0;font:bold 12px Arial}.menubar{height:22px;border-bottom:1px solid #888;padding:3px 8px;font-size:11px;word-spacing:14px}.toolbar{display:flex;gap:6px;padding:4px 7px;border-top:1px solid white;border-bottom:1px solid #888}.tool{min-width:48px;border-color:transparent;display:flex;align-items:center;flex-direction:column;gap:2px;padding:2px 7px;font-size:11px}.tool:hover{border-color:#fff #888 #888 #fff}.tool svg{width:22px;height:22px}.address{height:28px;display:flex;align-items:center;gap:7px;padding:3px 7px;border-top:1px solid white}.address input{flex:1;min-width:0;height:22px;border:2px inset #eee;background:#fff;padding-left:5px;font-size:12px}.desktop{position:relative;flex:1;min-height:0;overflow:hidden;--link:#0000ee;--ink:#111;--paper:#f6f5f1;background:var(--paper);color:var(--ink)}.desktop:before{content:'';position:absolute;inset:0;background:url('/assets/backgrounds/light.jpg') center/cover;opacity:.55;pointer-events:none}.desktop.dark{--link:#6388ff;--ink:#eee;--paper:#101010}.desktop.dark:before{filter:invert(1);opacity:.22}.preferences{position:absolute;right:22px;top:20px;z-index:10000;display:flex;align-items:center;gap:8px;font:12px 'Courier New',monospace}.preferences button{background:transparent;color:var(--ink);border:0;padding:2px}.preferences button.active{text-decoration:underline}.home-menu{position:absolute;left:50%;top:43%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px;font:18px 'Times New Roman',serif}.footer{position:absolute;bottom:7%;left:0;width:100%;text-align:center;display:flex;flex-direction:column;gap:5px;font:12px 'Courier New',monospace}.statusbar{height:20px;border:2px inset #eee;font-size:11px;padding:1px 5px}.retro-window{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:420px;height:265px;padding:3px;background:#c0c0c0;border:2px solid;border-color:#fff #555 #555 #fff;display:flex;flex-direction:column;box-shadow:1px 1px #444}.retro-window.child{margin:40px 0 0 90px;width:390px;height:245px}.retro-window.gallery-window{width:min(86%,1150px);height:min(68%,590px)}.retro-window.maximized{left:3px!important;top:3px!important;transform:none!important;margin:0!important;width:calc(100% - 6px)!important;height:calc(100% - 38px)!important}.retro-window.minimized{display:none}.windowbody{background:var(--paper);color:var(--ink);flex:1;min-height:0;overflow:auto;border:2px inset #eee;padding:22px;font:13px 'Courier New',monospace}.centerlinks{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:17px;font:16px 'Times New Roman',serif}.csgtext{font:13px/1.6 'Courier New',monospace;margin:0 0 22px}.construction{display:grid;place-content:center;height:100%}.gallerybody{padding:18px 25px 12px;position:relative;overflow:hidden}.gallery{display:flex;gap:24px;overflow-x:auto;height:100%;scroll-snap-type:x mandatory;align-items:stretch;scrollbar-color:#c0c0c0 #eee;scrollbar-width:auto}.gallery figure{margin:0;flex:0 0 245px;display:flex;flex-direction:column;gap:12px;scroll-snap-align:start;min-height:0;padding-bottom:12px}.gallery img,.missing-art{width:100%;flex:1;min-height:0;object-fit:contain}.missing-art{display:grid;place-content:center;border:1px dotted #888;text-align:center;color:#888;font-size:12px}.gallery figcaption{text-align:center;font:12px/1.4 'Courier New',monospace;min-height:34px}.arrow{position:absolute;top:45%;background:var(--paper);color:var(--ink);border:0;font:24px 'Times New Roman';padding:3px;z-index:2}.arrow.prev{left:2px}.arrow.next{right:2px}.tasks{position:absolute;bottom:0;display:flex;gap:4px;padding:3px;z-index:10001;max-width:100%;overflow:auto}.tasks:empty{display:none}.tasks button{padding:4px 12px;white-space:nowrap}.search-input{width:100%;padding:6px;border:2px inset #eee}.results{display:flex;flex-direction:column;gap:12px;margin-top:20px}.chrome-controls{pointer-events:none}@media(max-width:600px){.menubar{display:none}.toolbar{gap:0;justify-content:space-between;padding:3px 0}.tool{min-width:0;width:12.5%;padding:5px 0;height:44px}.tool span{display:none}.titlebar{font-size:10px}.address{font-size:11px}.preferences{right:10px;top:12px}.preferences button{min-width:32px;height:44px}.home-menu{font-size:18px;gap:14px}.footer{font-size:11px;bottom:8%}.retro-window,.retro-window.child,.retro-window.gallery-window{width:94%;height:60%;margin:0;max-height:90%;}.retro-window.child{top:55%}.retro-window .titlebar{height:44px}.windowbuttons button{width:35px;height:34px}.gallery-window{height:75%!important}.gallery figure{flex-basis:72vw}.gallerybody{padding:12px 22px}.windowbody{padding:18px}.gallerybody{padding:12px 22px}.arrow{width:24px;height:44px}.centerlinks a{padding:6px}.gallery figcaption{font-size:11px}.tasks button{min-height:44px}}@media print{body,#app,.browser{height:auto;overflow:visible}.browser>.titlebar,.menubar,.toolbar,.address,.preferences,.statusbar,.tasks,.arrow{display:none!important}.desktop{background:#fff!important;color:#000!important}.desktop:before{display:none}.retro-window{display:none!important}.retro-window.print-active{display:block!important;position:static;transform:none;margin:0;width:100%;height:auto;border:0;box-shadow:none}.retro-window .titlebar{display:none}.windowbody,.gallerybody{overflow:visible;background:white;color:black}.gallery{display:block;height:auto}.gallery figure{display:inline-flex;width:40%;height:350px;margin:10px}.home-menu,.footer{position:static;transform:none;margin:30px}.has-windows .home-menu,.has-windows .footer{display:none}}

/* Unframed page; Windows chrome belongs only to content windows. */
body{background:#fff}.browser{padding:0}.desktop{--paper:#fff}.desktop:not(.dark):before{display:none}
.preferences{font-size:16px;gap:7px;top:16px;right:20px}.preferences button{min-width:36px;min-height:36px;font-size:16px}.preferences [data-theme]{font-size:23px}
.retro-window>.titlebar{height:28px;font-size:12px;padding:3px 4px}.windowbuttons{gap:2px}.windowbuttons button{width:23px;height:21px;line-height:15px;font:bold 16px Arial;padding:0;position:relative;color:transparent}.windowbuttons button:after{content:'';position:absolute;left:5px;top:4px;width:10px;height:9px;color:#000}.windowbuttons [data-action="minimize"]:after{border-bottom:2px solid #000;height:10px;width:8px}.windowbuttons [data-action="maximize"]:after{border:1px solid #000;border-top:3px solid #000}.windowbuttons [data-action="close"]:after{content:'×';font:bold 17px/11px Arial;color:#000}.maximized [data-action="maximize"]:after{box-shadow:2px -2px 0 -1px #c0c0c0,2px -2px 0 0 #000}
.gallery figure{justify-content:center;align-items:center;flex-shrink:0;gap:12px}.gallery img{flex:none;width:auto;max-width:100%;height:auto;max-height:calc(100% - 66px);object-fit:contain}.gallery figcaption{flex:none;width:100%;min-height:0}.gallery{align-items:stretch}.gallery figure{height:100%}.footer{font-size:13px}
@media(max-width:600px){.preferences{right:10px;top:10px;font-size:16px}.preferences button{min-width:36px;min-height:44px}.retro-window>.titlebar{height:35px}.windowbuttons button{width:27px;height:25px}.windowbuttons button:after{left:7px;top:6px}.footer{font-size:12px}.gallery img{max-height:calc(100% - 70px)}}

/* Reserve the global controls and lower task area even while maximized. */
.desktop{--control-space:76px;--task-space:46px}.retro-window.maximized{top:var(--control-space)!important;height:calc(100% - var(--control-space) - var(--task-space))!important;max-height:none!important}
.preferences button.active{text-decoration:none}.preferences button{position:relative}.preferences button.active:after{content:'';position:absolute;height:1px;width:20px;background:currentColor;bottom:3px;left:50%;transform:translateX(-50%)}
.gallerybody{display:flex;flex-direction:column}.gallery{flex:1;min-height:0;height:auto}.gallery figure{justify-content:center;height:100%;min-width:0}.gallery picture{display:flex;justify-content:center;align-items:flex-end;max-width:100%;min-height:0;max-height:calc(100% - 62px)}.gallery img{display:block;width:auto;height:auto;max-width:100%;max-height:min(480px,calc(100dvh - 270px));flex:none}.gallery figcaption{margin:0}
.retro-window.maximized .gallery img{max-height:min(650px,calc(100dvh - 270px))}
@media(max-width:600px){.desktop{--control-space:72px;--task-space:52px}.gallery img,.retro-window.maximized .gallery img{max-height:calc(100dvh - 285px)}}
.is-loading,.is-loading *{cursor:progress!important}
.loading-hourglass{position:fixed;z-index:2147483647;width:16px;height:24px;pointer-events:none;display:none;image-rendering:pixelated}.is-loading .loading-hourglass.visible{display:block}

/* Give the gallery an explicit layout area; images never participate in flex shrinking. */
.gallerybody{flex:1 1 0;min-height:0}.gallery{flex:1 1 0;min-height:0;align-items:stretch}
.gallery figure{height:auto;align-self:stretch;justify-content:center;overflow:hidden}
.gallery picture{flex:0 0 auto;width:100%;min-height:1px;max-height:none;justify-content:center;align-items:center}
.gallery picture img,.retro-window.maximized .gallery picture img{flex:0 0 auto;min-width:1px;min-height:1px;max-width:100%;max-height:none;object-fit:contain}
.gallery figcaption{flex:0 0 auto}

/* Test background supplied by the author; invert the same photograph for dark mode. */
.desktop:before,.desktop:not(.dark):before{display:block;background-image:url('/assets/backgrounds/test-xerox.jpg');background-position:center;background-size:cover;opacity:1;filter:none}
.desktop.dark:before{display:block;filter:invert(1);opacity:1}

/* Plain backgrounds requested by the author. */
.desktop,.desktop:not(.dark){--paper:#fff;background:#fff}.desktop.dark{--paper:#000;background:#000}
.desktop:before,.desktop:not(.dark):before,.desktop.dark:before{display:none;background-image:none}
.image-open{display:flex;align-items:center;justify-content:center;width:100%;margin:0;padding:0;background:transparent;border:0;cursor:pointer}
.retro-window.image-window{width:min(88%,1100px);height:min(76%,800px);margin:0;left:50%;top:53%}
.imagebody{display:flex;align-items:center;justify-content:center;padding:16px;min-height:0;overflow:hidden}.full-image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
@media(max-width:600px){.retro-window.image-window{width:94%;height:74%}}

.breakout{position:absolute;inset:0;z-index:0;pointer-events:none}.breakout canvas{display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges}

.home-menu,.footer{z-index:1}.preferences{z-index:10000}
@media print{.breakout{display:none!important}}

.breakout-touch-zone{display:none;position:absolute;left:0;right:0;z-index:0;touch-action:none;user-select:none;-webkit-user-select:none}.breakout-touch-zone[hidden]{display:none!important}@media(any-pointer:coarse){.breakout-touch-zone{display:block}}@media print{.breakout-touch-zone{display:none!important}}

.image-open:disabled{cursor:default;opacity:1}.image-open:disabled:active{border:0}

/* Montenegro opens in the same desktop window system as the portfolio. */
.retro-window[data-id="montenegro"]{width:min(88%,760px);height:min(78%,680px);margin:0;top:53%}
.retro-window[data-id="montenegro"] .windowbody{padding:0;overflow:hidden;background:#000}
.montenegro-frame{display:block;width:100%;height:100%;border:0;background:#000}
@media(max-width:600px){.retro-window[data-id="montenegro"]{width:96%;height:calc(100% - 132px);top:72px;left:50%;transform:translateX(-50%);max-height:none}}
/* Semantic headings use the existing window typography. */
h1.titletext{margin:0;font:inherit}
