:root {
  /* Windows 95 system colors */
  --desktop: #008080;
  --face: #c0c0c0;
  --light: #dfdfdf;
  --hilight: #ffffff;
  --shadow: #808080;
  --dark: #0a0a0a;
  --title: #000080;
  --title-inactive: #6f6f6f;
  --title-text: #ffffff;
  --text: #000000;
  --text-muted: #4a4a4a;
  --window: #ffffff;
  --tooltip: #ffffe1;
  --select: #000080;

  --tb-h: 36px;
  --credit-h: 0px; /* the phones-only credit strip above the taskbar */
  --ui: "Arimo", "Arial", system-ui, sans-serif;
  --display: "Frank Ruhl Libre", "Times New Roman", serif;
  --slide-ease: cubic-bezier(.65, 0, .35, 1); /* used by exhibit mechanics (smiley tilt, counter reels) */

  /* bevels: light always falls from the top-left, as on every Win95 screen (also mirrored ones) */
  --raised: inset -1px -1px var(--dark), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow), inset 2px 2px var(--light);
  --raised-window: inset -1px -1px var(--dark), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight);
  --pressed: inset -1px -1px var(--hilight), inset 1px 1px var(--dark), inset -2px -2px var(--light), inset 2px 2px var(--shadow);
  --sunken: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dark), inset -2px -2px var(--light);
  --sunken-thin: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight);
  --dither: repeating-conic-gradient(var(--hilight) 0 25%, var(--face) 0 50%) 0 0 / 2px 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: var(--desktop);
  color: var(--text);
  font-family: var(--ui);
  font-size: 14px;
  height: 100svh;
  overflow: hidden;
  touch-action: manipulation;
  width: 100vw;
}

::selection { background: var(--select); color: var(--title-text); }

button { color: inherit; cursor: pointer; font: inherit; }

/* Win95 focus: a dotted rectangle inside the control */
:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }

.sr-only {
  border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; white-space: nowrap; width: 1px;
}

/* ---------- icons ---------- */
.i { display: block; flex: none; height: 16px; width: 16px; }
.i.px { shape-rendering: crispEdges; }
.drawing {
  fill: none; stroke: var(--text); stroke-linecap: square; stroke-linejoin: miter; stroke-width: 2;
}
.drawing .f { fill: var(--hilight); }
.drawing .s { fill: var(--face); }
.drawing .k { fill: var(--text); stroke: none; }
/* 32px "large icon" size: strokes land on 1px, snapped to the pixel grid */
.drawing.px32 { height: 32px; shape-rendering: crispEdges; stroke-width: 1.5; width: 32px; }
.folder32 { display: block; height: 32px; shape-rendering: crispEdges; width: 32px; }
/* the selected icon: Win95 dithers it with the selection navy (filter defined in index.html) */
[aria-current] > .folder32, .fi:focus > .drawing, .fi[aria-current] > .drawing { filter: url(#sel-dither); }

/* ---------- controls ---------- */
.btn {
  background: var(--face);
  border: none;
  box-shadow: var(--raised);
  min-height: 32px;
  min-width: 88px;
  padding: 5px 14px;
}
.btn:active { box-shadow: var(--pressed); padding: 6px 13px 4px 15px; }
.btn.default { box-shadow: 0 0 0 1px var(--dark), var(--raised); }
.btn.default:active { box-shadow: 0 0 0 1px var(--dark), var(--pressed); }
.btn .i { display: inline-block; margin-inline-end: 6px; vertical-align: -3px; }

/* caption buttons (min / max / close / help) */
.caption-btns { display: flex; gap: 0; margin-inline-start: auto; }
.cb {
  align-items: center; background: var(--face); border: none; box-shadow: var(--raised); display: flex;
  flex: none; height: 18px; justify-content: center; padding: 0; width: 20px;
}
.cb + .cb.close { margin-inline-start: 2px; }
.cb:active { box-shadow: var(--pressed); }
.cb:active svg { transform: translate(1px, 1px); }
.cb svg { height: 9px; width: 10px; }
.cb:focus-visible { outline-offset: -3px; }

/* ---------- windows ---------- */
.win {
  background: var(--face);
  box-shadow: var(--raised-window);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  max-width: 100%;
  padding: 3px;
  position: relative;
}
.titlebar {
  align-items: center;
  background: var(--title-inactive);
  color: var(--title-text);
  display: flex;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  gap: 5px;
  height: 24px;
  padding: 2px 3px;
  user-select: none;
}
.win.is-active > .titlebar { background: var(--title); }
.titlebar .drawing { height: 16px; width: 16px; stroke-width: 3; }
.titlebar .cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.well { background: var(--window); box-shadow: var(--sunken); padding: 10px 12px; }

hr.etched { border: none; border-bottom: 1px solid var(--hilight); border-top: 1px solid var(--shadow); height: 0; margin: 10px 0; }

.statusbar { display: flex; flex: none; gap: 2px; margin-top: 2px; }
.statusbar > span { box-shadow: var(--sunken-thin); flex: 1; font-size: 13px; line-height: 1.3; padding: 3px 6px; }
.statusbar > span.narrow { flex: 0 0 auto; }

.dialog-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ---------- desktop ---------- */
.desktop { bottom: calc(var(--tb-h) + var(--credit-h)); left: 0; overflow: hidden; overflow: clip; position: fixed; right: 0; top: 0; }

.icons {
  display: grid; gap: 2px; grid-template-rows: repeat(10, minmax(0, 84px));
  inset: 6px 4px 6px auto; position: absolute; width: 92px;
}
.icon {
  align-items: center; background: none; border: none; color: var(--title-text); display: flex;
  flex-direction: column; gap: 4px; padding: 4px 2px; width: 88px;
}
.icon .label { font-size: 12.5px; line-height: 1.2; padding: 1px 3px; text-align: center; }
@media (max-height: 820px) { .icon { gap: 2px; padding-block: 2px; } .icon .label { font-size: 12px; } }
.icon[aria-current] .label { background: var(--select); outline: 1px dotted var(--title-text); outline-offset: -1px; }
.icon:focus-visible { outline: none; }
.icon:focus-visible .label { outline: 1px dotted var(--title-text); outline-offset: 1px; }

.stage { inset: 0 100px 0 0; position: absolute; }

.scene {
  align-items: center; display: flex; gap: 0; inset: 0; justify-content: center; padding: 22px 26px;
  position: absolute;
}
.scene.is-closed > .win { display: none; }

/* exhibit scene: program window (right) + its Properties dialog cascaded under its left edge */
.app { flex: 0 1 auto; z-index: 2; }
.client { align-items: center; display: flex; flex: 1; justify-content: center; min-height: 0; padding: 14px; }
.artifact { position: relative; }
.artifact * { cursor: auto; }
.artifact button, .artifact input, .artifact textarea, .artifact a, .artifact [role="button"] { cursor: pointer; }
.artifact input[type="text"], .artifact textarea { cursor: text; }

.props { align-self: flex-start; flex: 0 0 340px; margin-inline-start: -16px; margin-top: max(48px, 7vh); max-height: calc(100% - max(48px, 7vh)); z-index: 1; }
.dialog-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 8px 6px 6px; }
.tabs { display: flex; padding-inline-start: 2px; position: relative; z-index: 1; }
.tab {
  background: var(--face); border-radius: 3px 3px 0 0; box-shadow: inset 1px 1px var(--hilight), inset -1px 0 var(--dark), inset -2px 0 var(--shadow);
  font-size: 13px; padding: 4px 12px 5px;
}
.tabpanel { box-shadow: var(--raised-window); margin-top: -1px; min-height: 0; overflow: auto; padding: 14px 14px 12px; }
.prop-head { align-items: center; display: flex; gap: 12px; }
.prop-head .drawing { height: 36px; width: 36px; }
.prop-head h2 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.prop-rows { display: grid; gap: 4px 10px; grid-template-columns: auto 1fr; }
.prop-rows dt { color: var(--text-muted); }
.prop-rows dd { font-variant-numeric: tabular-nums; font-weight: 700; }
.prop-text p { line-height: 1.55; margin-bottom: 8px; }
.prop-text p:last-of-type { margin-bottom: 0; }
.more {
  background: none; border: none; color: var(--title); display: none; font-weight: 700; min-height: 32px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- welcome dialog (title) ---------- */
.welcome { width: min(600px, 100%); }
.welcome .dialog-body { flex-direction: row; gap: 18px; padding: 18px 18px 16px; }
.welcome-main { flex: 1; min-width: 0; }
.welcome h1 { font-family: var(--display); font-size: clamp(30px, 4.4vw, 42px); font-weight: 400; line-height: 1.1; }
.welcome h1 b { display: block; font-weight: 700; }
.welcome .sub { color: var(--text-muted); margin: 6px 0 16px; }
.tip { min-height: 128px; }
.tip-head { align-items: center; display: flex; font-weight: 700; gap: 8px; margin-bottom: 8px; }
.tip-head .i { height: 26px; width: 26px; }
.tip-text { line-height: 1.6; }
.welcome-buttons { display: flex; flex-direction: column; gap: 8px; }
.welcome-buttons .btn { min-width: 112px; }

/* ---------- end: an Explorer window ---------- */
.explorer { width: min(760px, 100%); }
.explorer .well { flex: 1; min-height: 0; overflow: auto; padding: 18px 20px; }
.explorer.is-max { inset: 0 0 calc(var(--tb-h) + var(--credit-h)) 0; max-height: none; max-width: none; position: fixed; width: auto; z-index: 30; }

/* menu bar (Explorer, folder windows) */
.menubar { display: flex; flex: none; font-size: 13px; gap: 2px; padding: 2px 0 3px; }
.menubar > * { background: none; border: none; padding: 2px 7px; }
.menubar button:hover, .menubar button:focus-visible { background: var(--select); color: var(--title-text); outline: none; }
.menubar u { text-underline-offset: 2px; }
.end-head h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.1; }
.end-head p { line-height: 1.6; margin-top: 6px; max-width: 52ch; }
.visits { margin-top: 12px; }
.visits .group {
  align-items: center; border-bottom: 1px solid var(--shadow); box-shadow: 0 1px var(--hilight); display: flex;
  font-size: 13px; font-weight: 700; gap: 6px; margin: 10px 0 6px; padding-bottom: 3px;
}
.group-items { display: grid; gap: 4px 2px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); list-style: none; }
.visit .label { font-size: 12.5px; line-height: 1.2; padding: 1px 3px; text-align: center; }
.visit small { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.visit:hover .label, .visit:focus-visible .label { background: var(--select); color: var(--title-text); }
.visit:focus-visible { outline: none; }
.visit:focus-visible .label { outline: 1px dotted var(--title-text); outline-offset: -1px; }
/* unvisited: the ghosted (dithered) icon Win95 draws for unavailable items */
.visit.unvisited .drawing { -webkit-mask: var(--ghost); mask: var(--ghost); }
/* disabled text, embossed the Win95 way */
.visit.unvisited .label, .visit.unvisited small { color: var(--shadow); text-shadow: 1px 1px var(--hilight); }
.visit.unvisited:hover .label, .visit.unvisited:focus-visible .label { color: var(--title-text); text-shadow: none; }
:root { --ghost: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 2px 2px; }

/* ---------- maximized program window ---------- */
.app.is-max { inset: 0; margin: 0; position: fixed; bottom: calc(var(--tb-h) + var(--credit-h)); z-index: 30; }
.app.is-max .client { overflow: auto; }

/* ---------- taskbar ---------- */
.taskbar {
  align-items: center; background: var(--face); bottom: 0; box-shadow: inset 0 1px var(--light), inset 0 2px var(--hilight);
  display: flex; gap: 4px; height: var(--tb-h); left: 0; padding: 4px 3px 3px; position: fixed; right: 0; z-index: 60;
}
.tb {
  align-items: center; background: var(--face); border: none; box-shadow: var(--raised); display: flex; flex: none;
  font-size: 13.5px; gap: 6px; height: 100%; padding: 0 9px;
}
.tb:active, .tb[aria-expanded="true"] { box-shadow: var(--pressed); }
.tb .i { height: 16px; width: 16px; }
.start { font-weight: 700; gap: 5px; padding-inline: 6px 8px; }
.start .i { height: 20px; width: 20px; }
.prev .i { transform: scaleX(-1); }
.task { flex: 0 1 230px; font-weight: 700; justify-content: flex-start; min-width: 0; }
.task .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task[aria-pressed="true"] { background: var(--dither); box-shadow: var(--pressed); }
.task .drawing { height: 16px; width: 16px; stroke-width: 3; }
.tb-sep { border-left: 1px solid var(--hilight); border-right: 1px solid var(--shadow); flex: none; height: 80%; width: 2px; }
.tray {
  align-items: center; box-shadow: var(--sunken-thin); display: flex; flex: none; font-size: 13px; gap: 10px;
  height: 100%; margin-inline-start: auto; padding: 0 10px; font-variant-numeric: tabular-nums;
}
.tray-year { font-weight: 700; }

/* who built it: beside the tray; on phones a strip above the taskbar */
.tb-credit { color: var(--text); flex: none; font-size: 12.5px; margin-inline-start: auto; padding: 0 6px; text-decoration: none; white-space: nowrap; }
.tb-credit + .tray { margin-inline-start: 0; }
.tb-credit:hover, .tb-credit:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.credit-strip { display: none; }

/* ---------- Start menu ---------- */
.startmenu {
  background: var(--face); bottom: calc(var(--tb-h) - 2px); box-shadow: var(--raised-window); display: flex;
  max-height: calc(100svh - var(--tb-h)); padding: 3px; position: fixed; right: 2px; width: 300px; z-index: 70;
}
.banner {
  background: var(--shadow); color: var(--face); display: flex;
  flex: none; font-size: 20px; padding: 8px 0; width: 34px; align-items: flex-end; justify-content: center;
}
.banner span { transform: rotate(180deg); white-space: nowrap; writing-mode: vertical-rl; }
.banner b { color: var(--title-text); }
.menu-items { display: flex; flex: 1; flex-direction: column; min-width: 0; overflow: auto; padding: 2px 0; }
.mi {
  align-items: center; background: none; border: none; display: flex; gap: 10px; min-height: 38px;
  padding: 3px 10px 3px 12px; text-align: right; width: 100%;
}
.mi .drawing { height: 26px; width: 26px; }
.mi .year { color: var(--text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-inline-start: auto; }
.mi:hover, .mi:focus { background: var(--select); color: var(--title-text); outline: none; }
.mi:hover .year, .mi:focus .year { color: var(--title-text); }
.mi:hover .drawing .f, .mi:focus .drawing .f { fill: var(--light); }
.mi[aria-current] .t { font-weight: 700; }
.mi[aria-current]::after {
  background: currentColor; border-radius: 50%; content: ""; flex: none; height: 6px; order: -1; width: 6px;
}
.mi:not([aria-current])::after { content: ""; flex: none; order: -1; width: 6px; }
.mi-sep { border-bottom: 1px solid var(--hilight); border-top: 1px solid var(--shadow); margin: 3px 4px; }
.mi .fly { height: 8px; margin-inline-start: auto; width: 8px; }
.mi.has-sub[aria-expanded="true"] { background: var(--select); color: var(--title-text); }
.mi.is-current .t { font-weight: 700; }

/* flyout: opens to the left of the Start menu, as a mirrored Win95 cascade */
.submenu {
  background: var(--face); box-shadow: var(--raised-window); display: flex; flex-direction: column;
  max-height: calc(100svh - var(--tb-h)); min-width: 250px; overflow: auto; padding: 3px; position: fixed; z-index: 71;
}
.submenu .mi { min-height: 30px; padding-block: 2px; }
.submenu .mi .drawing { height: 20px; width: 20px; stroke-width: 2.4; }
.submenu .mi .i { height: 16px; width: 16px; }

/* ---------- help dialog ---------- */
.modal-layer { align-items: center; display: flex; inset: 0 0 var(--tb-h) 0; justify-content: center; padding: 16px; position: fixed; z-index: 80; }
.help-win { width: min(480px, 100%); }
.help-list { display: grid; gap: 8px; line-height: 1.5; list-style: none; padding: 10px 6px 2px; }
.help-list li { padding-inline-start: 14px; position: relative; }
.help-list li::before { background: var(--text); content: ""; height: 5px; inset-inline-start: 0; position: absolute; top: 9px; width: 5px; }

/* ---------- folder window (one decade, large icons) ---------- */
.float-layer { inset: 0; pointer-events: none; position: absolute; z-index: 20; }
.folder-win { inset-block-start: 14px; inset-inline-start: 108px; pointer-events: auto; position: absolute; width: min(520px, calc(100% - 124px)); }
.folder-win .well { max-height: min(56vh, 460px); overflow: auto; padding: 10px 8px; }
.folder-items { display: grid; gap: 6px 2px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); list-style: none; }
.fi, .visit {
  align-items: center; background: none; border: none; display: flex; flex-direction: column; gap: 4px;
  padding: 6px 2px; width: 100%;
}
.fi .label { font-size: 12.5px; line-height: 1.2; padding: 1px 3px; text-align: center; }
.fi small { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fi:hover .label, .fi:focus .label, .fi[aria-current] .label { background: var(--select); color: var(--title-text); }
.fi:focus { outline: none; }
.fi:focus .label { outline: 1px dotted var(--title-text); outline-offset: -1px; }

/* window being dragged: the outline frame Win95 drew instead of the window */
.dragframe {
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 2px 2px; mix-blend-mode: difference;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 4px; pointer-events: none; position: fixed; z-index: 96;
}

/* ---------- restore animation: a title bar stepping from the taskbar to the window ---------- */
.zoomrect { background: var(--title); pointer-events: none; position: fixed; z-index: 90; }

/* ---------- tooltip toast ---------- */
.toast {
  background: var(--tooltip); border: 1px solid var(--dark); bottom: calc(var(--tb-h) + 8px);
  font-size: 13.5px; left: 8px; max-width: min(360px, calc(100vw - 16px)); opacity: 0; overflow-wrap: anywhere;
  padding: 6px 10px; pointer-events: none; position: fixed; visibility: hidden; z-index: 95;
}
.toast.show { opacity: 1; visibility: visible; }

/* ---------- collapsed Properties: phones and short screens ---------- */
@media (max-width: 820px), (max-height: 600px) {
  .prop-text p.extra { display: none; }
  .props.open .prop-text p.extra { display: block; }
  .more { display: inline-block; }
}

@media (min-width: 821px) and (max-height: 600px) {
  .icons { display: none; }
  .stage { inset: 0; }
  .scene { padding-block: 10px; }
  .props { margin-top: 0; max-height: 100%; }
  .tabpanel { padding: 10px 12px; }
}

/* ---------- short phones: the plaque folds down to its title until "קראו עוד" ---------- */
@media (max-width: 820px) and (max-height: 760px) {
  .props:not(.open) .prop-text p { display: none; }
  .props:not(.open) hr.etched { display: none; }
  .props .more { display: inline-block; }
}

/* ---------- phones ---------- */
@media (max-width: 820px) {
  :root { --tb-h: 48px; --credit-h: 20px; }
  .tb-credit { display: none; }
  .tb-credit + .tray { margin-inline-start: auto; }
  .credit-strip {
    background: var(--face); bottom: var(--tb-h); box-shadow: inset 0 1px var(--hilight); color: var(--text); display: block; font-size: 11.5px;
    height: var(--credit-h); left: 0; line-height: var(--credit-h); overflow: hidden; position: fixed; right: 0; text-align: center; text-decoration: none; white-space: nowrap; z-index: 59;
  }
  .icons { display: none; }
  .stage { inset: 0; }
  .scene { align-items: stretch; flex-direction: column; gap: 6px; justify-content: flex-start; padding: 6px; }
  .props { flex: none; margin-inline-start: 0; margin-top: 0; order: -1; }
  .props .tabs { display: none; }
  .props .tabpanel { margin-top: 0; padding: 10px 12px; }
  .props .prop-rows { display: none; }
  .props hr.etched:first-of-type { display: none; }
  .props .prop-head h2 { font-size: 17px; }
  .props .prop-head .drawing { height: 28px; width: 28px; }
  .props .prop-head { margin-bottom: 8px; }
  .props .dialog-buttons { margin-top: 8px; }
  .app { flex: 1; min-height: 0; }
  .btn { min-height: 44px; }
  .cb { height: 26px; width: 28px; }
  .titlebar { height: 32px; }
  .tb { font-size: 13px; padding: 0 8px; }
  .task { display: none; }
  .tb-sep:nth-of-type(2) { display: none; }
  .welcome .dialog-body { flex-direction: column; }
  .welcome-buttons { flex-direction: row; flex-wrap: wrap; }
  .welcome-buttons .btn { flex: 1; min-width: 0; }
  .scene.scene-welcome, .scene.scene-end { justify-content: center; }
  .startmenu { right: 0; width: min(300px, 100vw); }
  .submenu { bottom: calc(var(--tb-h) - 2px); right: 0; width: min(300px, 100vw); }
  .submenu .mi { min-height: 44px; }
  .folder-win { inset: 6px; width: auto; }
  .mi { min-height: 44px; }
}


/* links to the author (About box, end window, credits) */
a.author { color: #0000ee; text-underline-offset: 2px; }
.end-head .by { color: var(--text-muted); font-size: 13px; }
.os-credits .roll a.author { color: #fff; }
