/* ===================================================================
   Photo board — visual system
   paper: cool oatmeal   ink: near-black   accent: archival ink blue
   type: Archivo (interface) / Newsreader (writing) / Plex Mono (data)
   =================================================================== */

:root {
  --paper:      #ebede7;
  --paper-deep: #e2e5dc;
  --card:       #ffffff;
  --ink:        #17191a;
  --ink-soft:   #666b62;
  --ink-faint:  #9aa094;
  --line:       #d6d9cf;
  --accent:     #26418f;
  --accent-ink: #ffffff;
  --danger:     #94322b;

  --pad:   clamp(20px, 4vw, 56px);
  --sheet: clamp(340px, 30vw, 460px);
  --radius: 3px;

  --ui:   'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --read: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(22px, 3vw, 34px) var(--pad) 20px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.tagline {
  margin: 8px 0 0;
  font-family: var(--read);
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
}

.masthead__tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.counter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- buttons ---------- */

.btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--ink-soft); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: #1d3474; border-color: #1d3474; }
.btn--primary:disabled { opacity: .5; cursor: default; background: var(--accent); }

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  padding: 9px 10px;
}
.btn--quiet:hover { color: var(--ink); border-color: transparent; }
.btn--danger:hover { color: var(--danger); }

/* ---------- notices ---------- */

.notice {
  margin: 20px var(--pad) 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  background: var(--card);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  font-size: 14px;
  max-width: 720px;
}
.notice code { font-family: var(--mono); font-size: 12.5px; }
.notice__detail { color: var(--ink-soft); word-break: break-word; }

/* ---------- upload tray ---------- */

.uploads {
  margin: 18px var(--pad) 0;
  display: grid;
  gap: 8px;
  max-width: 560px;
}

.up {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  font-size: 13px;
}
.up__name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.up__pct { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.up__bar {
  grid-column: 1 / -1;
  height: 2px;
  background: var(--paper-deep);
  overflow: hidden;
}
.up__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s ease;
}
.up--failed { border-left: 3px solid var(--danger); }
.up--failed .up__pct { color: var(--danger); }

/* ---------- empty state ---------- */

.empty { padding: clamp(40px, 9vw, 96px) var(--pad); }

.empty__frame {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.empty__lede {
  margin: 0;
  font-family: var(--read);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 300;
}
.empty__hint {
  margin: 12px auto 0;
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: 14px;
}
.empty__hint em { font-family: var(--read); }

/* ---------- grid (contact sheet) ---------- */

.grid {
  padding: 26px var(--pad) 60px;
  columns: 4 260px;
  column-gap: 22px;
}
@media (max-width: 700px) { .grid { columns: 2 150px; column-gap: 14px; } }

.card {
  break-inside: avoid;
  margin: 0 0 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@media (max-width: 700px) { .card { margin-bottom: 14px; } }

.card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-faint);
  box-shadow: 0 10px 24px -18px rgba(0,0,0,.5);
}

.card__img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-deep);
  border-radius: 1px;
}

.card__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 3px 2px;
}

.frame-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  flex: none;
}

.card__title {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__title--unset { color: var(--ink-faint); font-weight: 400; }

.card__note {
  margin: 0 3px 2px;
  font-family: var(--read);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.is-new { animation: rise .4s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- colophon ---------- */

.colophon {
  margin-top: auto;
  padding: 16px var(--pad) 26px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- drag veil ---------- */

.dropveil {
  position: fixed;
  inset: 12px;
  z-index: 60;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: rgba(235,237,231,.82);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
}

/* ---------- viewer ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sheet);
  background: #23251f;
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.viewer__stage {
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 56px);
  min-width: 0;
  min-height: 0;
}
.viewer__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #1a1c17;
  box-shadow: 0 30px 70px -40px #000;
}

.viewer__close,
.viewer__step {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,.08);
  border: 0;
  color: #e9ebe3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background .15s ease;
}
.viewer__close:hover, .viewer__step:hover { background: rgba(255,255,255,.2); }
.viewer__close { top: 16px; left: 16px; font-size: 24px; }
.viewer__step { top: 50%; transform: translateY(-50%); font-size: 26px; }
.viewer__step--prev { left: 16px; }
.viewer__step--next { right: calc(var(--sheet) + 16px); }
.viewer__step[disabled] { opacity: .25; cursor: default; }

/* the writing panel — an archive card */
.sheet {
  background: var(--paper);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet__scroll {
  padding: clamp(22px, 2.4vw, 34px);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.frame {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sheet__title {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0 0 10px;
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  width: 100%;
}
.sheet__title::placeholder { color: var(--ink-faint); font-weight: 400; letter-spacing: -0.01em; }
.sheet__title:focus { outline: none; border-bottom-color: var(--accent); }

.sheet__note {
  margin-top: 18px;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  min-height: 210px;
  width: 100%;
  font-family: var(--read);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.62;
}
.sheet__note::placeholder { color: var(--ink-faint); font-style: italic; }
.sheet__note:focus { outline: none; }

.specs {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.specs dt { letter-spacing: .1em; text-transform: uppercase; }
.specs dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.specs a { color: inherit; }

.sheet__foot {
  border-top: 1px solid var(--line);
  padding: 14px clamp(22px, 2.4vw, 34px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sheet__foot .btn--danger { margin-left: auto; }

.state {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.state--dirty { color: var(--danger); }

/* viewer on small screens */
@media (max-width: 860px) {
  .viewer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 42vh) minmax(0, 1fr);
  }
  .viewer__stage { padding: 54px 16px 12px; }
  .viewer__step { top: 22vh; }
  .viewer__step--next { right: 16px; }
  .sheet { border-left: 0; border-top: 1px solid var(--line); }
  .sheet__note { min-height: 140px; font-size: 16px; }
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 12px);
  z-index: 90;
  background: var(--ink);
  color: #f2f3ee;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

.viewer:focus { outline: none; }

/* ===================================================================
   Review page (admin.php) — the owner's side
   =================================================================== */

/* --- password gate --- */

.gate-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 38px);
}

.gate__title {
  margin: 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.gate__lede {
  margin: 6px 0 26px;
  font-family: var(--read);
  font-weight: 300;
  font-size: 16px;
  color: var(--ink-soft);
}

.gate__label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
}

.gate__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.gate__input:focus { outline: none; border-color: var(--accent); }

.gate__error {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.gate__btn { width: 100%; margin-top: 18px; }

/* --- tally --- */

.review .masthead__id .frame { margin-bottom: 6px; }

.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-bottom: 1px solid var(--line);
}

.tally__item {
  padding: 20px var(--pad);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.tally__item:last-child { border-right: 0; }

.tally__n {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tally__k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  max-width: 12ch;
  line-height: 1.35;
}

.tally__item--hi .tally__n { color: var(--accent); }

/* --- controls --- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 18px var(--pad) 0;
}

.search {
  flex: 1 1 220px;
  max-width: 320px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.search:focus { outline: none; border-color: var(--accent); }

.pills { display: flex; gap: 0; }

.pill {
  border: 1px solid var(--line);
  border-right-width: 0;
  background: var(--card);
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}
.pill:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.pill:last-child { border-right-width: 1px; border-radius: 0 var(--radius) var(--radius) 0; }
.pill.is-on { background: var(--ink); color: #f2f3ee; border-color: var(--ink); }

.controls__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.controls__right .is-on { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.hint {
  margin: 12px var(--pad) 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --- entries --- */

.entries {
  padding: 14px var(--pad) 60px;
  display: grid;
  gap: 14px;
  max-width: 1080px;
}

.entry {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.entry--fresh { border-left-color: var(--accent); }

.entry__shot { display: block; }
.entry__shot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper-deep);
  border-radius: 1px;
}

.entry__body { min-width: 0; }

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  letter-spacing: .12em;
}
.badge--wait { background: transparent; color: var(--ink-faint); border: 1px solid var(--line); }

.entry__title {
  margin: 8px 0 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.entry__title--unset { color: var(--ink-faint); font-weight: 400; }

.entry__note {
  font-family: var(--read);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 62ch;
}
.entry__note--empty { color: var(--ink-faint); font-style: italic; font-size: 15px; }

.entry .specs { margin-top: 18px; grid-template-columns: auto 1fr auto 1fr; }

@media (max-width: 720px) {
  .entry { grid-template-columns: 1fr; gap: 14px; }
  .entry__shot img { max-height: 240px; object-fit: cover; }
  .entry .specs { grid-template-columns: auto 1fr; }
  .controls__right { margin-left: 0; }
}

/* --- printed review --- */

@media print {
  .masthead__tools, .controls, .hint, .colophon, .tally__item--hi { display: none; }
  body { background: #fff; }
  .entry {
    border: 0;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 16px 0;
    break-inside: avoid;
  }
  .entries { max-width: none; padding: 0 12px; gap: 0; }
  .entry__shot img { max-width: 150px; }
  a { text-decoration: none; color: inherit; }
}

/* --- activity ping on the review page --- */

.ping {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: #f2f3ee;
  padding: 10px 12px 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 16px 40px -24px rgba(0,0,0,.8);
  animation: rise .3s ease both;
}

.ping__btn {
  border: 1px solid rgba(255,255,255,.3);
  background: transparent;
  color: inherit;
  padding: 5px 12px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
}
.ping__btn:hover { background: rgba(255,255,255,.14); }

@media print { .ping { display: none; } }

/* ===================================================================
   The two doors (index.php)
   =================================================================== */

.doors-body { min-height: 100vh; }

.doors-head {
  padding: clamp(32px, 6vw, 64px) var(--pad) 0;
  text-align: center;
}
.doors-head .wordmark { font-size: clamp(28px, 5vw, 42px); }
.doors-head .tagline { margin-top: 10px; }

.doors {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  padding: clamp(28px, 5vw, 56px) var(--pad) clamp(40px, 6vw, 80px);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.door {
  padding: clamp(26px, 3.5vw, 42px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius) 0 0 var(--radius);
}
.door--alt {
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--paper-deep);
}

.door__title {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.door__lede {
  margin: 12px 0 26px;
  font-family: var(--read);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
}

.btn--big {
  padding: 14px 26px;
  font-size: 15.5px;
  margin-top: auto;
  text-decoration: none;
  display: inline-block;
}

.door__foot {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--ink-faint);
  max-width: 34ch;
}

.door__form { display: none; width: 100%; margin-top: auto; }
.door__form.is-open { display: block; }

.door__label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
}

.door__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 14px;
}
.door__input:focus { outline: none; border-color: var(--accent); }

.door__error { margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.door__go { margin-top: 12px; }

@media (max-width: 760px) {
  .doors { grid-template-columns: 1fr; }
  .door { border-radius: var(--radius) var(--radius) 0 0; }
  .door--alt { border-left: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
  .btn--big { width: 100%; text-align: center; margin-top: 8px; }
  .door__lede { margin-bottom: 18px; }
}

/* ===================================================================
   Dashboard (admin.php)
   =================================================================== */

.gate__back { margin: 16px 0 0; text-align: center; font-size: 13px; }
.gate__back a { color: var(--ink-faint); text-decoration: none; }
.gate__back a:hover { color: var(--ink); }

.notice--good { border-left-color: #2f6b3a; }

.panel { padding: 20px var(--pad) 60px; max-width: 1040px; }

/* the freshly made link, handed over */
.handoff {
  margin: 20px var(--pad) 0;
  max-width: 1040px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.handoff__row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.handoff__link {
  flex: 1 1 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
}
.handoff__hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }

/* create form */
.maker {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.maker__summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.maker__summary::-webkit-details-marker { display: none; }
.maker__summary::before { content: '+ '; color: var(--accent); font-weight: 600; }
.maker[open] .maker__summary::before { content: '– '; }

.maker__form {
  padding: 4px 20px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: end;
}
.maker__form .btn { grid-column: 1 / -1; justify-self: start; }
.field--wide { grid-column: 1 / -1; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.field input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 620px) { .maker__form { grid-template-columns: 1fr; } }

/* the list of links */
.links { display: grid; gap: 14px; }

.link {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.link--fresh { border-left-color: var(--accent); }
.link--closed { background: var(--paper-deep); }

.link__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.link__title {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.link__counts {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 4px;
}
.link__counts strong { font-size: 15px; color: var(--ink); letter-spacing: -0.02em; }

.link__row { display: flex; gap: 8px; margin: 16px 0 0; flex-wrap: wrap; }

.link__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.link__foot .btn { text-decoration: none; }
.inline { display: inline; margin: 0; }

.link__when {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* settings */
.settings {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.settings__title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.settings .maker__form { padding-left: 0; padding-right: 0; max-width: 520px; }
.settings__note {
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.6;
}
.settings__note code { font-family: var(--mono); font-size: 12px; }

.masthead__id .frame a { color: inherit; text-decoration: none; }
.masthead__id .frame a:hover { color: var(--ink); }

.door__error--top { margin: 10px 0 0; }
