/* ============================================================
   PAWZI OS — Windows 98 chrome kit
   Palette sampled directly from the PAWZI banner + logo art.
   ============================================================ */

:root {
  /* --- surface / bevel ------------------------------------ */
  --face:      #c9bfb9;   /* warm silver, sampled from banner */
  --face-alt:  #d5cdc8;
  --face-lt:   #ded7d1;   /* inner highlight                  */
  --face-hi:   #fffdfb;   /* outer highlight                  */
  --face-sh:   #8f847c;   /* inner shadow                     */
  --face-dk:   #2e2a26;   /* outer shadow                     */

  /* --- brand ---------------------------------------------- */
  --nav:       #00186f;   /* deep navy, title bars            */
  --nav-mid:   #0033a0;
  --nav-lt:    #2f6ad0;
  --nav-ink:   #001a88;   /* wordmark navy                    */
  --paw:       #002ead;   /* logo blue                        */
  --sky:       #b3c4e7;   /* inner window sky panel           */
  --sky-lt:    #cfdcf3;
  --sky-air:   #96c8fe;   /* wallpaper blue                   */
  --pink:      #ff9fb7;
  --pink-lt:   #ffd5d8;
  --pink-dk:   #d9587c;
  --sticky:    #f2e79a;
  --lime:      #1f8f3a;
  --amber:     #b8720c;
  --rust:      #a01c1c;

  /* --- ink ------------------------------------------------ */
  --ink:       #16130f;
  --ink-soft:  #4a423b;
  --ink-dim:   #736a62;
  --ink-inv:   #ffffff;
  --ink-dis:   #8f847c;

  /* --- type ----------------------------------------------- */
  --f-ui:     "MS Sans", Tahoma, "Segoe UI", sans-serif;
  --f-body:   Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --f-pixel:  "Press Start 2P", "Silkscreen", monospace;
  --f-silk:   "Silkscreen", "Press Start 2P", monospace;
  --f-mono:   "VT323", "Courier New", ui-monospace, monospace;

  /* --- metrics -------------------------------------------- */
  --taskbar-h: 40px;
  --ease-win: cubic-bezier(.2, .9, .25, 1);
}

/* ============================================================
   WINDOW
   ============================================================ */
.win {
  position: relative;
  background: var(--face);
  padding: 3px;
  box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt),
    4px 4px 0 rgba(0, 12, 48, .28);
}

.win__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 3px 0 4px;
  background: linear-gradient(90deg, var(--nav-mid) 0%, var(--nav-lt) 38%, var(--nav) 100%);
  color: #fff;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.win__bar::after {           /* slow specular sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.20) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.win.is-open .win__bar::after { animation: barSweep 6.5s var(--ease-win) 1.1s infinite; }


.win__bar img.win__ico { width: 16px; height: 16px; image-rendering: pixelated; flex: none; }

.win__title {
  font: 700 12px/1 var(--f-ui);
  letter-spacing: .2px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  padding-top: 1px;
}

.win__btns { display: flex; gap: 2px; flex: none; margin-left: auto; }

.tbtn {
  width: 20px; height: 18px;
  background: var(--face);
  border: 0;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
  font: 700 11px/1 var(--f-ui);
  padding: 0;
  box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt);
}
.tbtn:active, .tbtn[aria-pressed="true"] {
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
}
.tbtn:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }
.tbtn i { display: block; width: 8px; height: 8px; position: relative; }
.tbtn--min i { border-bottom: 2px solid var(--ink); height: 7px; width: 7px; }
.tbtn--max i { border: 1px solid var(--ink); border-top-width: 2px; }
.tbtn--close i::before, .tbtn--close i::after {
  content: ""; position: absolute; left: -1px; top: 3px;
  width: 10px; height: 2px; background: var(--ink);
}
.tbtn--close i::before { transform: rotate(45deg); }
.tbtn--close i::after  { transform: rotate(-45deg); }

.win__menu {
  display: flex; gap: 2px;
  padding: 2px 2px 3px;
  font: 400 12px/1 var(--f-ui);
  border-bottom: 1px solid var(--face-sh);
  box-shadow: 0 1px 0 var(--face-hi);
}
.win__menu span {
  padding: 3px 7px;
  cursor: default;
  border: 1px solid transparent;
}
.win__menu span:hover { background: var(--nav); color: #fff; }
.win__menu u { text-underline-offset: 2px; }

.win__body { padding: 16px; background: var(--face); }
.win__body--field {
  background: #fff;
  margin: 3px;
  padding: 18px;
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
}

.win__status {
  display: flex; gap: 3px; align-items: stretch;
  padding: 3px;
  font: 400 11px/1 var(--f-ui);
}
.win__status > * {
  padding: 4px 7px;
  box-shadow: inset -1px -1px 0 var(--face-hi), inset 1px 1px 0 var(--face-sh);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win__status > .grow { flex: 1 1 auto; min-width: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 30px;
  padding: 7px 16px;
  background: var(--face-alt);
  color: var(--ink);
  border: 0;
  font: 700 12px/1 var(--f-ui);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt);
  transition: transform .06s linear, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active {
  transform: translate(1px, 1px);
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
}
.btn:focus-visible { outline: 1px dotted var(--ink); outline-offset: -5px; }
.btn img, .btn svg { width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
.btn--lg { min-height: 42px; padding: 11px 24px; font-size: 13px; }
.btn--default { box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt),
    0 0 0 2px var(--ink); }
.btn--pink { background: var(--pink-lt); }
.btn--pink:hover { background: #ffe3e6; }
.btn[disabled] { color: var(--ink-dis); text-shadow: 1px 1px 0 var(--face-hi); cursor: not-allowed; }

/* ============================================================
   FIELDS / GROUPS / TABLES
   ============================================================ */
.field {
  background: #fff;
  padding: 12px 14px;
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
}

.group {
  position: relative;
  border: 1px solid var(--face-sh);
  border-right-color: var(--face-hi);
  border-bottom-color: var(--face-hi);
  padding: 20px 16px 16px;
  margin-top: 10px;
}
.group::after {
  content: ""; position: absolute; inset: 1px;
  border: 1px solid var(--face-hi);
  border-right-color: var(--face-sh);
  border-bottom-color: var(--face-sh);
  pointer-events: none;
}
.group > legend, .group__title {
  position: absolute; top: -8px; left: 10px;
  background: var(--face);
  padding: 0 6px;
  font: 700 11px/1 var(--f-ui);
  z-index: 1;
}

table.w98 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font: 400 13px/1.45 var(--f-body);
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
}
table.w98 th {
  background: var(--face);
  font: 700 11px/1 var(--f-ui);
  text-align: left;
  padding: 7px 10px;
  position: sticky; top: 0;
  box-shadow:
    inset -1px -1px 0 var(--face-sh),
    inset  1px  1px 0 var(--face-hi);
  white-space: nowrap;
}
table.w98 td {
  padding: 9px 10px;
  border-bottom: 1px solid #e6e2de;
  vertical-align: middle;
}
table.w98 tbody tr:last-child td { border-bottom: 0; }
table.w98 tbody tr { transition: background .12s ease; }
table.w98 tbody tr:hover { background: #eef2fb; }
table.w98 tbody tr.is-hot { background: #fdf1f4; }
table.w98 td.num { font-family: var(--f-mono); font-size: 17px; letter-spacing: .3px; }
table.w98 caption {
  caption-side: bottom; text-align: left; padding-top: 8px;
  font: 400 11px/1.5 var(--f-ui); color: var(--ink-soft);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }


/* ============================================================
   PROGRESS / METERS
   ============================================================ */
.meter {
  height: 20px;
  background: var(--face);
  padding: 2px;
  box-shadow:
    inset -1px -1px 0 var(--face-hi),
    inset  1px  1px 0 var(--face-sh),
    inset -2px -2px 0 var(--face-lt),
    inset  2px  2px 0 var(--face-dk);
  overflow: hidden;
}
.meter__fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg,
      var(--m-color, var(--nav-mid)) 0 10px,
      transparent 10px 12px);
  transition: width 1.4s var(--ease-win);
}
.meter--solid .meter__fill { background: var(--m-color, var(--nav-mid)); }

/* ============================================================
   DIALOG (small floating message boxes)
   ============================================================ */
.dlg {
  background: var(--face);
  padding: 3px;
  min-width: 190px;
  box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt),
    4px 4px 0 rgba(0, 12, 48, .3);
}
.dlg__bar { height: 22px; }
.dlg__bar .win__title { font-size: 11px; }
.dlg__body {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 14px 8px;
  font: 400 12px/1.5 var(--f-ui);
}
.dlg__body img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.dlg__foot { display: flex; gap: 8px; justify-content: center; padding: 6px 12px 12px; }
.dlg__foot .btn { min-width: 74px; }

/* ============================================================
   MISC ATOMS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 4px;
  font: 400 9px/1 var(--f-silk);
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--face-alt);
  box-shadow: inset -1px -1px 0 var(--face-sh), inset 1px 1px 0 var(--face-hi);
}
.badge--lime { background: #cdf0d3; }

.chip-dot { width: 10px; height: 10px; flex: none; box-shadow: inset -1px -1px 0 rgba(0,0,0,.35), inset 1px 1px 0 rgba(255,255,255,.6); }


hr.w98 {
  border: 0; height: 2px; margin: 18px 0;
  background: linear-gradient(180deg, var(--face-sh) 0 1px, var(--face-hi) 1px 2px);
}

.scan { position: relative; }
.scan::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.055) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* selection */
::selection { background: var(--nav); color: #fff; }

/* scrollbar — Win98 */
* { scrollbar-width: auto; scrollbar-color: var(--face-alt) #e9e5e1; }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
  background: repeating-conic-gradient(#f0ece8 0% 25%, #dcd6d0 0% 50%) 50% / 2px 2px;
}
::-webkit-scrollbar-thumb {
  background: var(--face-alt);
  box-shadow:
    inset -1px -1px 0 var(--face-dk),
    inset  1px  1px 0 var(--face-hi),
    inset -2px -2px 0 var(--face-sh),
    inset  2px  2px 0 var(--face-lt);
}
::-webkit-scrollbar-corner { background: var(--face); }
