/* ============================================================
   HookedScams 3.1 :: a faux Windows 3.1 desktop that presents
   the live hookedscams.com content as DOS-era applications.

   Color palette is the genuine Win 3.1 system palette:
     silver (#c0c0c0), navy (#000080), teal (#008080),
     black, white, mid-gray (#808080).
   ============================================================ */

:root {
  --silver:    #c0c0c0;
  --silver-2:  #d4d0c8;
  --gray:      #808080;
  --gray-d:    #404040;
  --white:     #ffffff;
  --black:     #000000;
  --navy:      #000080;
  --navy-l:    #1084d0;
  --navy-d:    #00006b;
  --teal:      #008080;
  --red:       #800000;
  --red-l:     #ff0000;
  --yellow:    #ffff00;
  --olive:     #808000;

  --raised:
    inset 1px 1px 0 0 var(--white),
    inset -1px -1px 0 0 var(--gray-d),
    inset 2px 2px 0 0 var(--silver-2),
    inset -2px -2px 0 0 var(--gray);
  --sunken:
    inset 1px 1px 0 0 var(--gray-d),
    inset -1px -1px 0 0 var(--white),
    inset 2px 2px 0 0 var(--gray),
    inset -2px -2px 0 0 var(--silver-2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--teal);
  font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', 'Geneva', sans-serif;
  font-size: 12px;
  color: var(--black);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  image-rendering: pixelated;
  cursor: default;
  overflow: hidden;
  user-select: none;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    repeating-conic-gradient(var(--teal) 0deg 90deg, #007a7a 90deg 180deg)
      0 0 / 4px 4px;
  opacity: .35;
  z-index: 0;
  pointer-events: none;
}

/* -------- desktop & icons -------- */
#desktop {
  position: fixed;
  inset: 0 0 30px 0;
  z-index: 1;
}
.desktop-icons {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; flex-direction: column;
  gap: 16px;
  z-index: 2;
}
.desktop-icon {
  width: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: default;
  padding: 4px 2px;
}
.desktop-icon:focus { outline: 1px dotted var(--white); }
.desktop-icon.is-selected .di-label {
  background: var(--navy);
  color: var(--white);
}
.di-ico {
  width: 32px; height: 32px;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px var(--black);
  position: relative;
}
.di-ico.icon-mail   { background: linear-gradient(180deg, #ffd14a 0%, #c69a18 100%); }
.di-ico.icon-mail::after  { content: '\2709'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--black); }
.di-ico.icon-db     { background: linear-gradient(180deg, #cfe2ff 0%, #4a78ff 100%); }
.di-ico.icon-db::after    { content: '\2318'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; color: var(--white); font-weight: 700; }
.di-ico.icon-search { background: linear-gradient(180deg, #d4f5d4 0%, #2c8c2c 100%); }
.di-ico.icon-search::after{ content: '\2315'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: var(--white); font-weight: 700; }
.di-ico.icon-help   { background: linear-gradient(180deg, #fff8a8 0%, #d4a800 100%); }
.di-ico.icon-help::after  { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: var(--black); font-family: serif; font-weight: 700; font-style: italic; }
.di-ico.icon-note   { background: var(--white); box-shadow: inset 0 0 0 1px var(--black), 4px 4px 0 -1px var(--silver), 4px 4px 0 0 var(--black); }
.di-ico.icon-note::after { content: '\2261'; position: absolute; left: 4px; top: 6px; right: 4px; font-size: 14px; line-height: 6px; color: var(--black); letter-spacing: 0; word-spacing: 0; }
.di-ico.icon-form   { background: linear-gradient(180deg, #ffd1d1 0%, #c43b3b 100%); }
.di-ico.icon-form::after { content: '\270E'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--white); }
.di-ico.icon-coffee { background: linear-gradient(180deg, #b27a3a 0%, #5f3b18 100%); }
.di-ico.icon-coffee::after{ content: '\2615'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; }
.di-ico.icon-readme { background: var(--white); box-shadow: inset 0 0 0 1px var(--black); }
.di-ico.icon-readme::after { content: 'i'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-family: serif; font-style: italic; font-weight: 700; color: var(--navy); }
.di-ico.icon-exit   { background: linear-gradient(180deg, #1084d0 0%, #000080 100%); }
.di-ico.icon-exit::after { content: '\21D2'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: var(--white); font-weight: 700; }
.di-label {
  background: transparent;
  color: var(--white);
  text-align: center;
  font-size: 11px;
  text-shadow: 1px 1px 0 var(--black), -1px -1px 0 var(--black), 1px -1px 0 var(--black), -1px 1px 0 var(--black);
  padding: 1px 3px;
  line-height: 1.15;
  word-wrap: break-word;
  max-width: 80px;
}

/* -------- window manager -------- */
.window {
  position: absolute;
  background: var(--silver);
  box-shadow: var(--raised), 4px 4px 0 0 rgba(0,0,0,.45);
  min-width: 280px;
  min-height: 120px;
  display: flex; flex-direction: column;
  z-index: 100;
}
.window.is-min { display: none !important; }
.window.is-max {
  top: 0 !important; left: 0 !important;
  width: 100% !important;
  height: calc(100vh - 30px) !important;
}
.titlebar {
  display: flex; align-items: center;
  height: 22px;
  padding: 0 2px;
  color: #b0b0c8;
  background: var(--silver-2);
  font-weight: 700;
  font-size: 12px;
  cursor: default;
  flex: 0 0 22px;
  user-select: none;
}
.window.is-active .titlebar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-l) 100%);
  color: var(--white);
}
.titlebar .ctl-box {
  width: 18px; height: 18px;
  margin: 1px 4px 1px 1px;
  background: var(--silver);
  box-shadow: var(--raised);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: monospace; font-weight: 700; color: var(--black);
  font-size: 11px;
  flex: 0 0 18px;
}
.titlebar .ctl-box::before { content: '\2212'; }
.titlebar .title-text {
  flex: 1;
  text-align: center;
  text-shadow: 0 0 0 transparent;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  margin-right: 8px;
}
.window.is-active .titlebar .title-text { text-shadow: 1px 1px 0 var(--black); }
.titlebar .win-btns {
  display: flex; gap: 0;
  margin-right: 1px;
  flex: 0 0 auto;
}
.winbtn {
  width: 18px; height: 18px;
  margin: 1px;
  background: var(--silver);
  box-shadow: var(--raised);
  color: var(--black);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: monospace; font-weight: 700; font-size: 10px;
  border: 0;
  padding: 0;
  cursor: default;
  line-height: 1;
}
.winbtn:active { box-shadow: var(--sunken); }

/* generic menu/toolbar/statusbar reused by multiple apps */
.menu {
  display: flex;
  height: 20px;
  background: var(--silver);
  border-bottom: 1px solid var(--gray);
  padding: 0 2px;
  font-size: 12px;
  flex: 0 0 20px;
}
.menu .item { padding: 3px 8px; line-height: 14px; color: var(--black); }
.menu .item .underline { text-decoration: underline; }
.menu .item:hover { background: var(--navy); color: var(--white); }

.toolbar {
  display: flex; gap: 2px;
  padding: 4px;
  background: var(--silver);
  border-bottom: 1px solid var(--gray);
  flex: 0 0 auto;
  flex-wrap: wrap;
}
.tbtn {
  min-width: 64px;
  padding: 4px 8px;
  background: var(--silver);
  box-shadow: var(--raised);
  font-size: 11px;
  color: var(--black);
  cursor: default;
  display: inline-flex; align-items: center; gap: 6px;
  line-height: 1;
  border: 0;
}
.tbtn:active { box-shadow: var(--sunken); padding-top: 5px; padding-left: 9px; }
.tbtn.is-active { box-shadow: var(--sunken); background: var(--silver-2); }
.tbtn .ico {
  display: inline-block;
  width: 16px; height: 16px;
  background: var(--silver-2);
  box-shadow: inset 0 0 0 1px var(--black);
  text-align: center;
  line-height: 14px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
}
.tbtn-sep { width: 1px; background: var(--gray); margin: 2px 4px; }
.tbtn[disabled], .tbtn.is-disabled { color: var(--gray); }

.statusbar {
  display: flex;
  border-top: 1px solid var(--gray);
  font-size: 11px;
  background: var(--silver);
  flex: 0 0 22px;
}
.statusbar > div {
  padding: 3px 8px;
  box-shadow: var(--sunken);
  background: var(--silver);
  flex: 1 1 auto;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.statusbar > div.fixed { flex: 0 0 auto; }

.pix { display: inline-block; width: 8px; height: 8px;
       background: var(--gray-d); box-shadow: inset 0 0 0 1px var(--black);
       margin-right: 4px; vertical-align: middle; }
.pix-red    { background: var(--red-l); }
.pix-yellow { background: var(--yellow); }
.pix-green  { background: #00a000; }

/* -------- the body container of each window -------- */
.win-body {
  flex: 1 1 auto;
  background: var(--silver);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* -------- mail app -------- */
.mail-body { display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-rows: 200px 1fr;
  grid-template-areas: "folders inbox" "folders preview";
  flex: 1 1 auto;
  min-height: 0;
}
.folders {
  grid-area: folders;
  margin: 6px;
  background: var(--white);
  box-shadow: var(--sunken);
  overflow: auto;
  padding: 4px 0;
  font-size: 12px;
}
.folder-tree { list-style: none; margin: 0; padding: 0 6px; }
.folder { display: flex; align-items: center; gap: 6px; padding: 2px 4px; line-height: 16px; }
.folder.is-active { background: var(--navy); color: var(--white); }
.folder-ico { width: 16px; height: 14px; background: linear-gradient(180deg, #fff8a8 0%, #ffd14a 100%); box-shadow: inset 0 0 0 1px var(--black); flex: 0 0 16px; position: relative; }
.folder-ico::before { content: ''; position: absolute; left: 1px; top: -2px; width: 6px; height: 3px; background: linear-gradient(180deg, #fff8a8 0%, #ffd14a 100%); box-shadow: inset 0 0 0 1px var(--black); }
.folder.is-inbox .folder-ico, .folder.is-inbox .folder-ico::before { background: linear-gradient(180deg, #cfe2ff 0%, #6f9bff 100%); }
.folder-meta { color: var(--gray-d); margin-left: auto; font-size: 11px; }
.folder.is-active .folder-meta { color: #b8b8d8; }
.folder-divider { height: 1px; background: var(--gray); margin: 4px 6px; }

.inbox-pane { grid-area: inbox; margin: 6px 6px 3px 0; background: var(--white); box-shadow: var(--sunken); overflow: hidden; display: flex; flex-direction: column; }
.inbox-head { display: grid;
  grid-template-columns: 24px 24px minmax(140px, 1fr) minmax(220px, 2.4fr) 110px 60px;
  background: var(--silver); border-bottom: 1px solid var(--gray); font-size: 11px; font-weight: 700; }
.inbox-head > div { padding: 3px 6px; border-right: 1px solid var(--gray); box-shadow: var(--raised); }
.inbox-head > div:last-child { border-right: 0; }
.inbox-list { overflow: auto; flex: 1; }
.row { display: grid;
  grid-template-columns: 24px 24px minmax(140px, 1fr) minmax(220px, 2.4fr) 110px 60px;
  border-bottom: 1px dotted var(--silver-2); font-size: 12px; line-height: 18px; cursor: default; }
.row > div { padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.is-unread { font-weight: 700; }
.row.is-active { background: var(--navy); color: var(--white); }
.row.is-active .pri-high, .row.is-active .flag-live { color: var(--yellow); }
.row .pri-high { color: var(--red); font-weight: 700; }
.row .flag-live { color: var(--red); font-weight: 700; }
.row:hover:not(.is-active) { background: #ece9d8; }

.preview { grid-area: preview; margin: 3px 6px 6px 0; background: var(--white); box-shadow: var(--sunken); overflow: auto; padding: 0; display: flex; flex-direction: column; }
.preview-head { border-bottom: 2px solid var(--silver-2); padding: 6px 10px; background: var(--silver); }
.preview-head h2 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.preview-head dl { display: grid; grid-template-columns: 90px 1fr; margin: 0; font-size: 11px; row-gap: 2px; column-gap: 8px; }
.preview-head dt { color: var(--gray-d); font-weight: 700; }
.preview-head dd { margin: 0; color: var(--black); word-break: break-word; }
.preview-head .case-tag { display: inline-block; border: 1px solid var(--black); background: var(--silver-2); padding: 0 4px; font-size: 10px; font-weight: 700; margin: 0 4px 2px 0; }
.preview-body { padding: 12px 14px; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.55; color: var(--black); white-space: pre-wrap; flex: 1; user-select: text; }
.preview-body .stamp { display: inline-block; border: 1px solid var(--black); padding: 1px 4px; font-family: 'MS Sans Serif', sans-serif; font-weight: 700; font-size: 10px; background: #ffd1d1; margin-bottom: 8px; }
.preview-body .stamp-cyan  { background: #d1eaff; }
.preview-body .stamp-green { background: #d4f5d4; }
.preview-body .quote { color: var(--gray-d); }
.preview-body a { color: var(--navy); text-decoration: underline; cursor: pointer; }

/* -------- generic article window content (notepad / case open) -------- */
.doc-body {
  flex: 1 1 auto;
  background: var(--white);
  box-shadow: var(--sunken);
  margin: 6px;
  padding: 12px 16px;
  overflow: auto;
  font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--black);
  user-select: text;
}
.doc-body h1, .doc-body h2, .doc-body h3 {
  color: var(--navy); margin: 18px 0 8px;
}
.doc-body h1 { font-size: 18px; border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
.doc-body h2 { font-size: 15px; }
.doc-body h3 { font-size: 13px; }
.doc-body p, .doc-body ul, .doc-body ol { margin: 8px 0; }
.doc-body ul, .doc-body ol { padding-left: 22px; }
.doc-body code { background: var(--silver-2); padding: 0 4px; font-size: 12px; }
.doc-body pre { background: var(--white); border: 1px solid var(--gray); padding: 8px; overflow: auto; font-size: 12px; }
.doc-body pre code { background: transparent; padding: 0; }
.doc-body a { color: var(--navy); text-decoration: underline; cursor: pointer; }
.doc-body a:hover { color: var(--red); }
.doc-body blockquote {
  border-left: 3px solid var(--gray); margin: 8px 0; padding: 0 10px;
  color: var(--gray-d); font-style: italic;
}
.doc-body img { max-width: 100%; box-shadow: inset 0 0 0 1px var(--black); display: block; margin: 8px 0; }
.doc-body hr { border: 0; border-top: 1px dashed var(--gray); margin: 18px 0; }
.doc-body table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.doc-body th, .doc-body td { border: 1px solid var(--gray); padding: 3px 8px; text-align: left; }
.doc-body th { background: var(--silver-2); font-weight: 700; }
.doc-body .copy-btn,
.doc-body .code-header { display: none; }
.notepad-body {
  flex: 1 1 auto;
  background: var(--white);
  box-shadow: var(--sunken);
  margin: 0;
  padding: 4px 6px;
  overflow: auto;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 13px;
  line-height: 1.45;
  color: var(--black);
  white-space: pre-wrap;
  user-select: text;
}

/* -------- indicators DBF (table viewer) -------- */
.dbf-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.dbf-filterbar {
  display: flex; gap: 4px; padding: 4px 6px;
  background: var(--silver); border-bottom: 1px solid var(--gray);
  flex-wrap: wrap; flex: 0 0 auto;
}
.dbf-chip {
  padding: 2px 8px;
  background: var(--silver); box-shadow: var(--raised);
  font-size: 11px; cursor: default;
}
.dbf-chip.is-active { box-shadow: var(--sunken); background: var(--silver-2); }
.dbf-chip.is-active::before { content: '\25CF '; color: var(--red); }

.dbf-table-wrap { flex: 1 1 auto; overflow: auto; background: var(--white); box-shadow: var(--sunken); margin: 4px 6px; }
.dbf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}
.dbf-table th {
  position: sticky; top: 0;
  background: var(--silver); box-shadow: var(--raised);
  text-align: left; padding: 3px 6px; font-weight: 700;
  border-right: 1px solid var(--gray);
  font-family: 'MS Sans Serif', sans-serif;
  font-size: 11px;
  cursor: default;
}
.dbf-table th:hover { background: var(--silver-2); }
.dbf-table td {
  padding: 2px 6px;
  border-right: 1px dotted var(--silver-2);
  border-bottom: 1px dotted var(--silver-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 280px;
  user-select: text;
}
.dbf-table tr:hover td { background: #ece9d8; }
.dbf-table tr.is-active td { background: var(--navy); color: var(--white); }
.dbf-tag {
  display: inline-block;
  border: 1px solid var(--black);
  background: var(--silver-2);
  padding: 0 4px;
  font-size: 10px;
  font-family: 'MS Sans Serif', sans-serif;
  font-weight: 700;
  margin-right: 2px;
}
.dbf-tag.tag-front   { background: #ffd1d1; }
.dbf-tag.tag-vendor  { background: #ffe0a8; }
.dbf-tag.tag-catalog { background: #d4f5d4; }
.dbf-tag.tag-staff   { background: #cfe2ff; }
.dbf-tag.live    { background: #ffd1d1; color: var(--red); }
.dbf-tag.down    { background: #d4f5d4; color: #006600; }

/* -------- search.exe -------- */
.search-body {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  padding: 12px;
  gap: 10px;
  overflow: auto;
}
.search-row {
  display: flex; gap: 6px;
  align-items: center;
}
.search-input {
  flex: 1;
  background: var(--white);
  box-shadow: var(--sunken);
  border: 0;
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--black);
  height: 24px;
  outline: 0;
}
.search-go {
  padding: 4px 14px;
  background: var(--silver); box-shadow: var(--raised);
  font-size: 12px; font-weight: 700;
  border: 0; cursor: default;
}
.search-go:active { box-shadow: var(--sunken); padding-top: 5px; padding-left: 15px; }
.search-results {
  flex: 1 1 auto;
  background: var(--white);
  box-shadow: var(--sunken);
  overflow: auto;
  min-height: 120px;
  padding: 6px 8px;
  font-size: 12px;
  user-select: text;
}
.search-hit {
  padding: 6px 4px;
  border-bottom: 1px dotted var(--silver-2);
}
.search-hit code { background: var(--silver-2); padding: 0 4px; font-size: 12px; }
.search-hit-meta { color: var(--gray-d); font-size: 11px; margin-top: 2px; }
.search-hit-meta a { color: var(--navy); text-decoration: underline; cursor: pointer; }
.search-empty { color: var(--gray-d); font-style: italic; text-align: center; padding: 20px; }
.search-disclaimer { font-size: 11px; color: var(--gray-d); padding: 6px 4px 0; border-top: 1px solid var(--silver-2); margin-top: 6px; }

/* -------- help (scam types) -------- */
.help-body { display: grid; grid-template-columns: 220px 1fr; flex: 1 1 auto; min-height: 0; }
.help-toc {
  background: var(--white); box-shadow: var(--sunken);
  margin: 6px 3px 6px 6px; padding: 8px;
  overflow: auto; font-size: 12px;
}
.help-toc h3 { margin: 0 0 6px; font-size: 12px; color: var(--navy); }
.help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-toc li { padding: 2px 4px; cursor: default; }
.help-toc li:hover { background: #ece9d8; }
.help-toc li.is-active { background: var(--navy); color: var(--white); }
.help-content {
  background: var(--white); box-shadow: var(--sunken);
  margin: 6px 6px 6px 3px; padding: 12px 16px;
  overflow: auto;
  font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  user-select: text;
}
.help-content h1 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.help-content .help-sum { font-style: italic; color: var(--gray-d); margin: 0 0 14px; }
.help-content h2 { font-size: 14px; color: var(--navy); margin: 16px 0 6px; }
.help-content h3 { font-size: 13px; margin: 12px 0 4px; }
.help-content ul, .help-content ol { padding-left: 22px; margin: 8px 0; }
.help-content code { background: var(--silver-2); padding: 0 4px; }
.help-content a { color: var(--navy); text-decoration: underline; cursor: pointer; }

/* -------- form (report) -------- */
.form-body {
  flex: 1 1 auto;
  background: var(--silver);
  padding: 14px 18px;
  overflow: auto;
}
.form-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; margin: 6px 0; align-items: center; }
.form-row label { font-size: 12px; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--white); box-shadow: var(--sunken);
  border: 0; padding: 3px 6px;
  font-family: 'MS Sans Serif', sans-serif; font-size: 12px;
  outline: 0;
}
.form-row textarea { min-height: 110px; resize: vertical; font-family: 'Courier New', monospace; font-size: 12px; }
.form-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--gray); }
.form-actions .tbtn { min-width: 84px; }
.form-note { font-size: 11px; color: var(--gray-d); margin-bottom: 12px; padding: 8px; background: var(--white); box-shadow: var(--sunken); }
.form-status { font-size: 11px; color: var(--navy); padding: 8px; background: #d4f5d4; box-shadow: var(--sunken); margin-top: 10px; }

/* -------- about (textfile) and support (textfile) -------- */
.support-buttons {
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed var(--gray);
  background: var(--silver-2);
  text-align: center;
}
.support-buttons a {
  display: inline-block;
  padding: 5px 14px;
  background: var(--silver); box-shadow: var(--raised);
  color: var(--black); text-decoration: none; font-weight: 700;
  margin: 4px;
}
.support-buttons a:hover { color: var(--navy); }

/* -------- taskbar -------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 30px;
  background: var(--silver);
  box-shadow: var(--raised);
  display: flex; align-items: center;
  padding: 2px 4px;
  z-index: 1000;
  gap: 4px;
}
#start-btn {
  height: 22px;
  padding: 0 10px;
  background: var(--silver);
  box-shadow: var(--raised);
  font-weight: 700;
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: default;
}
#start-btn:active { box-shadow: var(--sunken); padding-top: 1px; padding-left: 11px; }
#start-btn .start-flag {
  display: inline-block; width: 14px; height: 14px;
  background: linear-gradient(180deg, #cfe2ff 0%, #4a78ff 100%);
  box-shadow: inset 0 0 0 1px var(--black);
}
#task-divider { width: 1px; align-self: stretch; background: var(--gray); margin: 0 4px; }
#task-list { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.taskitem {
  height: 22px;
  min-width: 140px;
  max-width: 200px;
  padding: 0 10px;
  background: var(--silver); box-shadow: var(--raised);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: default;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.taskitem.is-active { box-shadow: var(--sunken); background: var(--silver-2); }
.taskitem .ti-ico { width: 14px; height: 14px; flex: 0 0 14px; box-shadow: inset 0 0 0 1px var(--black); }
#systray {
  height: 22px;
  padding: 0 8px;
  background: var(--silver); box-shadow: var(--sunken);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 8px;
}

/* -------- start menu -------- */
#start-menu {
  position: fixed;
  bottom: 30px; left: 4px;
  width: 220px;
  background: var(--silver);
  box-shadow: var(--raised);
  z-index: 1100;
  display: none;
  padding: 4px;
}
#start-menu.is-open { display: block; }
.sm-item {
  padding: 6px 10px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  cursor: default;
}
.sm-item:hover { background: var(--navy); color: var(--white); }
.sm-item .ti-ico { width: 22px; height: 22px; flex: 0 0 22px; box-shadow: inset 0 0 0 1px var(--black); }
.sm-divider { height: 1px; background: var(--gray); margin: 4px 2px; }

/* -------- splash on first paint -------- */
#splash {
  position: fixed;
  inset: 0;
  background: var(--teal);
  color: var(--white);
  z-index: 9999;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: 'MS Sans Serif', sans-serif;
  transition: opacity .4s ease;
}
#splash.is-out { opacity: 0; pointer-events: none; }
#splash .splash-card {
  background: var(--silver);
  box-shadow: var(--raised), 6px 6px 0 0 rgba(0,0,0,.5);
  color: var(--black);
  padding: 30px 50px 22px;
  width: 380px;
  max-width: calc(100vw - 40px);
}
#splash h1 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--navy);
}
#splash h1 small { font-size: 14px; color: var(--gray-d); display: block; }
#splash p { margin: 6px 0; font-size: 12px; }
#splash .splash-foot { margin-top: 18px; font-size: 11px; color: var(--gray-d); }

/* -------- modal dialog (confirm exit, etc.) -------- */
.window.dialog {
  width: 360px;
  min-height: 0;
}
.dialog-body {
  padding: 18px 18px 6px;
  display: flex; gap: 14px;
  background: var(--silver);
  align-items: flex-start;
}
.dialog-icon {
  width: 32px; height: 32px;
  flex: 0 0 32px;
  background: linear-gradient(180deg, #fff8a8 0%, #d4a800 100%);
  box-shadow: inset 0 0 0 1px var(--black);
  position: relative;
}
.dialog-icon::after {
  content: '?';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: serif; font-style: italic; font-weight: 700;
  font-size: 22px; color: var(--black);
}
.dialog-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  user-select: text;
}
.dialog-actions {
  display: flex; justify-content: flex-end; gap: 6px;
  padding: 6px 12px 12px;
  background: var(--silver);
}
.dialog-actions .tbtn { min-width: 72px; justify-content: center; }

/* -------- mobile fallback (desktop UI is poor on phones) -------- */
@media (max-width: 720px) {
  .desktop-icons { gap: 8px; top: 8px; left: 8px; }
  .desktop-icon { width: 64px; }
  .di-label { font-size: 10px; }
  .window {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 60px) !important;
    left: 8px !important;
    top: 8px !important;
  }
  .mail-body {
    grid-template-columns: 1fr;
    grid-template-rows: 110px 130px 1fr;
    grid-template-areas: "folders" "inbox" "preview";
  }
  .help-body { grid-template-columns: 1fr; grid-template-rows: 100px 1fr; }
  .help-toc { margin: 6px; }
  .help-content { margin: 0 6px 6px; }
  .preview-head dl { grid-template-columns: 70px 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 4px; }
  .taskitem { min-width: 80px; }
  #systray { display: none; }
}
