/* Windows 98 proportions and bevels, recreated from the visual references. */
:root { --title: #000080; --title-light: #1084d0; }
body { font-family: Tahoma, "MS Sans Serif", Arial, sans-serif; font-size: 13px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; border-radius: 0; }
button { cursor: default; }
img { image-rendering: pixelated; }
.desktop { background: var(--desktop); }
.window, .utility-dialog {
  padding: 3px; border: 1px solid #c0c0c0;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #000, inset 2px 2px #dfdfdf, inset -2px -2px #808080;
}
.title-bar { min-height: 20px; padding: 2px 3px; gap: 4px; font: bold 11px Tahoma, Arial, sans-serif; }
.title-label { gap: 4px; }
.title-label img { width: 16px; height: 16px; }
.window-controls { gap: 2px; }
.window-controls button { width: 16px; height: 14px; border: 0; box-shadow: inset 1px 1px #fff, inset -1px -1px #000, inset 2px 2px #dfdfdf, inset -2px -2px #808080; font: bold 11px Arial, sans-serif; }
.window-controls button:active { box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080; padding: 1px 0 0 1px; }
.menu-bar { min-height: 23px; gap: 16px; padding: 4px 6px; font-size: 11px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; }
.window > .window-body { border: 2px inset #eee; background: #fff; margin: 4px 1px; padding: 12px; }
.window > .window-body.profile-body { background: #c0c0c0; border: 0; }
.window h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.04; }
.window h2 { font-size: 16px; }
.window h3 { font-size: 13px; }
.window .timeline section, .window .list-view section, .window .properties-grid p { background: #fff; border: 0; border-bottom: 1px solid #c0c0c0; padding: 8px 0; }
.window .timeline section:last-child, .window .list-view section:last-child, .window .properties-grid p:last-child { border-bottom: 0; }
.date, .properties-grid span { font-size: 12px; }
.window .address-bar { padding: 4px 6px; font-size: 11px; }
.window-statusbar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 2px; min-height: 20px; gap: 4px; background: #c0c0c0; font-size: 11px; color: #000; }
.window-statusbar > span:first-child { flex: 1; padding: 2px 4px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.window-grip { width: 13px; height: 13px; background: repeating-linear-gradient(135deg, transparent 0 2px, #808080 2px 3px, #fff 3px 4px); clip-path: polygon(100% 0,100% 100%,0 100%); }
.window.is-maximized > .window-body { min-height: 0; }
body:has(.utility-dialog[open]) .window .title-bar { background: #808080; }
.taskbar { min-height: 36px; padding: 3px; gap: 4px; }
.start-button, .task-buttons button, .tray { min-height: 26px; font-size: 11px; }
.start-menu { width: 205px; padding: 2px; bottom: 36px; font-size: 11px; }
.start-menu-sidebar { width: 22px; background: #808080; }
.start-menu-title { font: 20px Arial, sans-serif; color: #c0c0c0; letter-spacing: 0; }
.start-menu-title b { color: #fff; }
.start-menu-items { padding: 0; }
.start-menu .start-item { min-height: 32px; padding: 4px 5px; gap: 8px; font: 11px Tahoma, Arial, sans-serif; }
.start-menu .has-submenu { padding: 0; }
.start-menu > .start-menu-items > .start-item > img, .start-menu > .start-menu-items > .has-submenu > button > img { width: 24px; height: 24px; }
.start-menu button { cursor: default; }
.start-menu button:disabled { background: #c0c0c0; color: #808080; text-shadow: 1px 1px #fff; }
.start-submenu { width: 225px; padding: 2px; }
.start-submenu .start-item { min-height: 23px; padding: 3px 5px; gap: 7px; }
.start-submenu img { width: 16px; height: 16px; }
.start-item-arrow { margin-left: auto; margin-right: 2px; border-top-width: 3px; border-bottom-width: 3px; }
.start-menu-divider { margin: 3px 1px; }
.utility-dialog { font: 11px Tahoma, Arial, sans-serif; }
.utility-dialog::backdrop { background: transparent; }
.utility-body { padding: 12px; }
.utility-dialog .title-bar { background: linear-gradient(90deg,#000080,#1084d0); }
.utility-body button, .session-screen button { border: 1px solid #000; padding: 4px 10px; min-height: 23px; background: #c0c0c0; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; font-size: 11px; cursor: default; }
.utility-body button:active { padding: 5px 9px 3px 11px; box-shadow: inset 1px 1px #808080; }
.utility-body button:disabled { color: #808080; text-shadow: 1px 1px #fff; cursor: default; }
.utility-body input, .utility-body select { min-height: 21px; padding: 2px 4px; font: 11px Tahoma, sans-serif; margin: 0; border: 2px inset #eee; }
.utility-body p { line-height: 1.45; }
.utility-body label { margin: 0; }
.utility-dialog.run-dialog { width: min(345px, calc(100vw - 16px)); height: 148px; }
.utility-dialog.floating-utility { inset: auto; margin: 0; z-index: 200; }
.floating-utility .title-bar { cursor: move; touch-action: none; user-select: none; }
.run-dialog .utility-body { position: relative; height: calc(100% - 20px); padding: 10px 5px 5px; }
.run-dialog #runForm { display: grid; grid-template-rows: 43px 21px 23px; gap: 9px; }
.run-dialog .run-description { margin: 0; }
.run-dialog .run-description p { line-height: 14px; }
.run-dialog .run-field { margin: 0; }
.run-dialog .context-hint { position: absolute; top: 0; left: 4px; right: 4px; z-index: 1; padding: 8px; background: #ffffe1; border: 1px solid #000; }
.run-description { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 0 2px; margin-bottom: 15px; }
.run-description p { margin: 0; }
.run-field { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 3px; margin-bottom: 16px; }
.run-combo { display: flex; background: white; border: 2px inset #eee; height: 21px; }
.run-combo input { width: 100%; min-width: 0; border: 0; padding: 0 3px; outline-offset: -2px; }
.run-combo > span { width: 16px; flex: 0 0 16px; text-align: center; background: #c0c0c0; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; line-height: 16px; }
.run-actions { display: flex; justify-content: flex-end; gap: 6px; }
.run-actions button { min-width: 75px; }
.context-hint { margin: 0 0 12px; }
.utility-dialog.help-dialog { width: min(620px, calc(100vw - 16px)); }
.help-dialog .utility-body { padding: 3px 2px 2px; }
.help-toolbar { display: flex; position: relative; height: 47px; border-bottom: 1px solid #808080; box-shadow: 0 1px white; margin-bottom: 4px; gap: 3px; }
.help-toolbar > button { border: 0; box-shadow: none; min-width: 52px; padding: 3px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.help-tool-symbol { height: 16px; line-height: 16px; font-size: 18px; }
.help-toolbar > button:hover { box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
#helpOptionsMenu { position: absolute; top: 43px; left: 155px; z-index: 5; background: #c0c0c0; padding: 2px; box-shadow: 1px 1px #000; }
.help-layout { display: flex; gap: 4px; height: min(355px, calc(100dvh - 120px)); min-height: 180px; }
#helpNavigation { flex: 0 0 210px; display: flex; flex-direction: column; min-width: 0; }
.retro-tabs { display: flex; align-items: end; min-height: 27px; gap: 0; padding-left: 2px; }
.utility-body .retro-tabs button, .selected-tab { padding: 5px 7px; border: 1px solid #808080; border-bottom: 0; border-radius: 3px 3px 0 0; box-shadow: inset 1px 1px #fff; min-height: 25px; white-space: nowrap; }
.utility-body .retro-tabs button[aria-selected="true"], .selected-tab { position: relative; z-index: 1; padding-top: 7px; margin-bottom: -1px; background: #c0c0c0; }
.help-navigation-panel { flex: 1; min-height: 0; overflow: auto; background: #fff; padding: 5px; margin: 0 2px 2px; border: 2px inset #eee; }
.help-navigation-panel > label { display: block; margin-bottom: 5px; }
.help-navigation-panel input { width: 100%; margin-bottom: 7px; }
.help-navigation-panel button, .help-navigation-panel summary { display: flex; align-items: center; gap: 4px; padding: 3px 1px; min-height: 22px; border: 0; box-shadow: none; background: #fff; text-align: left; font-size: 11px; white-space: nowrap; }
.help-navigation-panel summary { list-style: none; cursor: default; }
.help-navigation-panel summary::before { content: '+'; font: 10px/9px monospace; width: 9px; height: 9px; text-align: center; border: 1px solid #808080; }
.help-navigation-panel details[open] summary::before { content: '−'; }
.help-navigation-panel details > button { margin-left: 25px; }
.help-navigation-panel button.is-selected span { color: white; background: #000080; outline: 1px dotted white; padding: 1px 2px; }
.help-topic { flex: 1; min-width: 0; border: 2px inset #eee; background: #fff; padding: 10px 12px; overflow: auto; }
.help-topic h3 { font: bold 11px Tahoma,sans-serif; margin-bottom: 14px; }
.help-topic p { margin-bottom: 10px; }
.utility-maximized { width: calc(100vw - 16px) !important; height: calc(100dvh - 52px); }
.utility-maximized.help-dialog .utility-body { height: calc(100% - 20px); max-height: none; }
.utility-maximized .help-layout { height: calc(100% - 55px); }
.properties-dialog { width: min(380px,calc(100vw - 16px)); }
.properties-dialog .utility-body { padding: 6px 7px; }
.property-panel { padding: 14px 10px; border: 1px solid #808080; box-shadow: inset 1px 1px #fff; min-height: 200px; }
.property-panel fieldset { margin: 12px 0 0; border: 1px solid #808080; padding: 12px 10px; }
.property-panel select { margin: 5px 0 8px; }
.property-panel input[type="color"] { width: 70px; height: 24px; padding: 2px; min-height: 0; }
.property-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.property-actions button { min-width: 72px; }
.monitor-preview { width: 150px; height: 117px; margin: 0 auto; padding: 10px; background: #808080; border: 3px outset #dfdfdf; position: relative; margin-bottom: 19px; }
.monitor-preview::after { content: ''; position: absolute; width: 82px; height: 13px; bottom: -16px; left: 31px; background: #c0c0c0; border: 2px outset #dfdfdf; }
#colorPreview { width: 100%; height: 82px; border: 3px inset #aaa; display: grid; place-items: center; color: white; font-size: 11px; }
.appearance-preview { border: 2px outset #eee; background: #fff; margin-bottom: 25px; }
.appearance-preview p { padding: 16px; }
.check-row { display: flex !important; align-items: center; gap: 7px; margin: 14px 0 !important; }
.check-row input { width: auto; min-height: 0; margin: 0; }
.control-dialog { width: min(465px,calc(100vw - 16px)); }
.control-panel { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: white; border: 2px inset #eee; padding: 15px 6px; min-height: 180px; }
.control-panel button { display: flex; flex-direction: column; align-items: center; gap: 8px; background: white; border: 0; box-shadow: none; padding: 8px 4px; align-self: start; }
.control-panel button:hover span { color: white; background: #000080; }
.system-panel { display: grid; grid-template-columns: 60px 1fr; gap: 16px; }
.system-panel h3 { font-size: 11px; }
.auto-hide-taskbar .taskbar { bottom: -30px; }
.auto-hide-taskbar .taskbar:hover, .auto-hide-taskbar .taskbar:focus-within { bottom: 0; }
html[data-pattern="dots"] .desktop { background-image: radial-gradient(#0004 1px,transparent 1px); background-size: 4px 4px; }
html[data-pattern="grid"] .desktop { background-image: linear-gradient(#ffffff22 1px,transparent 1px),linear-gradient(90deg,#ffffff22 1px,transparent 1px); background-size: 16px 16px; }
@media (max-width: 700px) {
  .start-submenu { width: 195px; }
  #activeDesktopMenu { left: 0; bottom: 100%; }
}
/* A direct-child selector keeps the next level closed until its own row is hovered. */
@media (hover: hover) {
  .has-submenu:hover > .start-submenu { display: flex; }
}
@media (hover: hover) and (min-width: 701px) {
  .start-submenu { left: calc(100% - 2px); }
}
@media (max-width: 440px) {
  .start-submenu { left: 20px; bottom: 100%; }
  .help-layout { flex-direction: column; height: min(500px,calc(100dvh - 120px)); }
  #helpNavigation { flex-basis: 185px; }
  .help-topic { min-height: 130px; }
  .control-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media print {
  body > .desktop, body > nav, body > footer, .boot-screen, .session-screen { display: none !important; }
  .utility-dialog[open] { position: static; width: 100%; max-height: none; height: auto; margin: 0; border: 0; box-shadow: none; }
  .utility-dialog .title-bar, .help-toolbar, #helpNavigation { display: none; }
  .help-layout, .help-topic, .utility-body { height: auto; max-height: none; overflow: visible; border: 0; }
}
