
/* Everything is classic DOS blue: #0000AA background, white monospace text. */
:root { color-scheme: only light; --blue: #0000aa; --blue-hi: #2b2bd6; --yellow: #ffff55; --cyan: #55ffff;
        --mono: ui-monospace, Menlo, Consolas, "Courier New", monospace; --bar: 44px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.5 var(--mono); color: #fff; background: var(--blue);
       display: flex; flex-direction: column; -webkit-text-size-adjust: 100%; }
header { flex: 0 0 var(--bar); height: var(--bar); display: flex; align-items: center; gap: 12px;
         padding: 0 16px; font-size: 13px; color: #fff; background: var(--blue); }
header .hint { flex: 0 0 auto; opacity: .75; }
#status { flex: 1; color: var(--yellow); font-weight: 700; transition: opacity .4s; white-space: nowrap; overflow: hidden; }
#status.warn { color: #ff7777; }
kbd { font: 12px var(--mono); border: 1px solid #fff; border-radius: 2px; padding: 0 3px; }
button { font: 14px var(--mono); color: var(--blue); background: #fff; border: 1px solid #fff; border-radius: 0;
         padding: 6px 12px; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: manipulation; }
button:hover, button:focus-visible { background: var(--yellow); border-color: var(--yellow); outline: none; }
button.link { color: #fff; background: none; border: 0; padding: 6px 4px; font-size: 13px; }
button.link:hover { background: none; text-decoration: underline; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }
main { flex: 1; display: flex; min-height: 0; }
#page { flex: 1; width: 100%; height: 100%; resize: none; border: 0; border-radius: 0; margin: 0;
        padding: 16px 32px; font: 16px/1.6 var(--mono); color: #fff; background: var(--blue);
        caret-color: #fff; outline: none; -webkit-appearance: none; appearance: none; }
#page::placeholder { color: #fff; opacity: .55; }
::selection { background: #fff; color: var(--blue); }
.overlay { position: fixed; top: var(--bar); left: 0; right: 0; bottom: 0; background: var(--blue); display: flex; }
.overlay[hidden] { display: none; }
.panel { flex: 1; width: 100%; height: 100%; overflow: auto; background: var(--blue); padding: 16px 32px; }
#q { display: block; width: 100%; margin: 0; padding: 0 12px; border: 0; border-radius: 0; outline: none;
     background: transparent; box-shadow: none; -webkit-appearance: none; appearance: none;
     font: 20px/1.4 var(--mono); color: #fff; caret-color: #fff; caret-shape: block; }
.muted { color: #fff; opacity: .75; font-size: 13px; }
#count { margin: 8px 12px; min-height: 1em; color: #fff; }
#results { list-style: none; margin: 0; padding: 0; }
#results li { padding: 11px 12px; cursor: pointer; }
#results li:hover, #results li.sel { background: var(--blue-hi); }
#results .date { font-size: 12px; opacity: .75; }
#results .snip { white-space: pre-wrap; word-break: break-word; }
mark { background: var(--yellow); color: var(--blue); padding: 0 1px; }
.note-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.note-head .btns { display: flex; gap: 8px; flex-wrap: wrap; }
#note-body { white-space: pre-wrap; word-break: break-word; font: 16px/1.6 var(--mono); }
#note-body a { color: var(--cyan); }
/* Memory Mate sign-in: title high, form around the middle */
.mm { justify-content: flex-start; align-items: center; padding: 0 16px; }
.mm-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; margin-top: calc(14vh + 21px); }
.mm-box h1 { margin: 0 0 max(24px, calc(17vh - 58px)); text-align: center; font: 700 28px var(--mono); letter-spacing: 1px; }
.mm-box input { font: 16px var(--mono); padding: 12px; color: #fff; background: var(--blue); border: 1px solid #fff;
  border-radius: 0; outline: none; -webkit-appearance: none; appearance: none; }
.mm-box input::placeholder { color: #fff; opacity: .6; }
.mm-box input:focus { border-color: var(--yellow); }
.mm-box button { font-size: 16px; padding: 12px; }
.mm-box .error { color: var(--yellow); text-align: center; }
.mm-pop, .mm-err { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 170, .92); }
.mm-pop-box, .mm-err { box-sizing: border-box; }
.mm-pop-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--blue); border: 2px solid #fff; box-shadow: 8px 8px 0 #000; }
.mm-pop-box p, .mm-err p { margin: 0 0 4px; text-align: center; line-height: 1.5; }
.mm-pop-box input { font: 16px var(--mono); padding: 12px; color: #fff; background: var(--blue); border: 1px solid #fff;
  border-radius: 0; outline: none; -webkit-appearance: none; appearance: none; }
.mm-pop-box input::placeholder { color: #fff; opacity: .6; }
.mm-pop-box input:focus { border-color: var(--yellow); }
.mm-pop-box button, .mm-err button { font-size: 16px; padding: 12px; }
.mm-cancel { color: #fff; text-align: center; font-size: 14px; opacity: .8; }
.mm-err { flex-direction: column; gap: 14px; background: rgba(0, 0, 170, .92); }
.mm-err p { color: var(--yellow); max-width: 340px; padding: 18px 22px; background: var(--blue); border: 2px solid var(--yellow); }
.mm-err button { min-width: 140px; }
.login { justify-content: center; align-items: center; padding: 16px; }
.login-box { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.login-box h1 { margin: 0 0 4px; font: 700 20px var(--mono); }
.login-box input { font: 16px var(--mono); padding: 10px; color: #fff; background: var(--blue); border: 1px solid #fff;
                   border-radius: 0; outline: none; -webkit-appearance: none; appearance: none; }
.login-box input::placeholder { color: #fff; opacity: .6; }
.login-box input:focus { border-color: var(--yellow); }
.login-box button { font-size: 16px; padding: 10px; }
.error { color: #ff7777; font-size: 14px; margin: 0; }
@media (max-width: 700px) {
  header .hint { display: none; }
  header { padding: 0 10px; gap: 8px; }
  #page, .panel { padding: 12px 14px; }
  #q { padding: 0 4px; }
  #count { margin: 8px 4px; }
  #results li { padding: 10px 4px; }
}
