/* ant.njp.zip: black on white, system font */

:root {
  --ink: #000;
  --grey: #6b6b6b;
  --faint: #b0b0b0;
  --line: #e6e6e6;
  --hover: #f4f4f4;
  --gutter: 32px;
  color-scheme: light;
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #fff;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
}
@media (max-width: 640px) {
  main { padding-top: 28px; }
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.filter {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  -webkit-appearance: none;
  appearance: none;
}
.filter::placeholder {
  color: var(--faint);
}
.filter:focus {
  outline: none;
}

/* one entry: title (+ subtitle) | authors or web site; the note under both */
.item {
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.item .head {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto;
  column-gap: 24px;
}
.item .title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.item .title a {
  font-weight: 600;
}
.item .sub,
.item .ext {
  color: var(--grey);
}
.item .ext {
  font-size: 13px;
}
.item .by {
  min-width: 0;
  overflow-wrap: anywhere;
}
.item .by .ed,
.item .by.none,
.item .by .host {
  color: var(--grey);
}
.item .by .edit {
  margin-left: 12px;
  padding: 0;
  font-size: 14px;
}
.item.is-sel {
  background: var(--hover);
  box-shadow: -8px 0 0 var(--hover), 8px 0 0 var(--hover);
}

/* read / done mark, at the right */
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  margin-top: -1px;
  color: var(--grey);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #000;
  cursor: pointer;
}
.item.is-read .check {
  color: var(--ink);
}

.note {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.note::placeholder {
  color: var(--faint);
}
.note:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--ink);
}
.note[readonly] {
  cursor: pointer;
}
.status {
  font-size: 13px;
  color: var(--grey);
  min-height: 0;
}
.status:empty {
  display: none;
}
.status.bad,
.msg.bad {
  color: #b00020;
}

/* add link / lock */
.bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 4px;
}
.textbtn {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--grey);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.textbtn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.textbtn.danger {
  color: #b00020;
  margin-left: auto;
}

/* password and link forms */
.panel {
  margin: 4px 0 12px;
  padding: 12px 16px 4px;
  background: var(--hover);
  cursor: auto;
}
.panel .lbl {
  display: block;
  margin: 8px 0 2px;
  font-size: 13px;
  color: var(--grey);
}
.panel .lbl:first-child {
  margin-top: 0;
}
.field {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  -webkit-appearance: none;
  appearance: none;
}
.field:focus {
  outline: none;
  border-bottom-width: 2px;
  padding-bottom: 5px;
}
.field.area {
  resize: vertical;
}
.inline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.inline .field {
  flex: 1;
  min-width: 0;
}
.panel .inline:first-of-type .field {
  margin: 0;
}
#pw .inline {
  margin-top: 2px;
}
.btn {
  padding: 6px 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.msg {
  margin: 6px 0 8px;
  min-height: 1.2em;
  font-size: 14px;
  color: var(--grey);
}

.empty {
  color: var(--grey);
  padding: 10px 0;
}

@media (max-width: 640px) {
  .item .head {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
  }
  .item .title { grid-column: 1; grid-row: 1; }
  .item .by { grid-column: 1; grid-row: 2; }
  .item .check { grid-column: 2; grid-row: 1 / span 2; }
  .item {
    padding: 12px 0 8px;
  }
  .item .by {
    margin-top: 2px;
    font-size: 15px;
  }
}

[hidden] { display: none !important; }
