:root {
  color-scheme: dark;
  --bg: #151410;
  --surface: #201e18;
  --ink: #f7efe0;
  --muted: #b8b0a2;
  --rule: #514c41;
  --amber: #ffbd58;
  --pane-width: min(100% - 2.4rem, 51rem);
  --brand-mark-width: clamp(2.75rem, 12.3vw, 4rem);
  --wordmark-size: clamp(1.4rem, 9vw, 2.8rem);
  --panorama: url("night-district-classic.svg");
  --panorama-position: center;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 100%/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.mast {
  width: var(--pane-width);
  margin-inline: auto;
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .9rem .7rem;
}
.mast::after {
  content: "";
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  aspect-ratio: 576 / 104;
  min-height: 4.7rem;
  background: var(--surface) var(--panorama) var(--panorama-position) / cover no-repeat;
  border-block: 2px solid var(--rule);
  box-shadow: 0 2px 0 var(--shadow, #100f0c);
}
.mast-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem 1.15rem;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: .85rem;
}
.theme-picker { display: inline-flex; align-items: center; }
.theme-choices { display: inline-flex; flex: none; align-items: center; }
/* Leave room for the 6px outward focus outline on either control. */
.theme-picker, .theme-choices { gap: .625rem; }
.theme-help {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}
.theme-help:hover { color: var(--amber); }
@media (min-width: 48rem) {
  .mast, .mast-tools { column-gap: .5rem; }
}
@media (max-width: 22.5rem) {
  .theme-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
.theme-picker select {
  min-height: 2.15rem;
  padding: .25rem .35rem;
  border: 2px solid var(--rule);
  border-radius: .35rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}
.credit { margin-inline-start: auto; white-space: nowrap; }
.credit a { text-underline-offset: .2em; }
.brand {
  --brand-twilight: #d87355;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 750;
  font-size: var(--wordmark-size);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.045em;
  text-decoration: none;
}
.accent { color: var(--amber); }
.brand .brand-dark { color: var(--brand-twilight); }
.mark {
  display: inline-block;
  flex: none;
  width: var(--brand-mark-width);
  aspect-ratio: 64 / 44;
  margin-right: .375rem;
  background: url("mark-classic.svg") center / contain no-repeat;
}
main {
  width: var(--pane-width);
  margin: clamp(1.65rem, 4.3vw, 3.1rem) auto;
  overflow-wrap: anywhere;
}
h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7.5vw, 4.7rem);
  line-height: 1.05;
  font-weight: 680;
  letter-spacing: -.065em;
}
.lede {
  max-width: 42rem;
  margin: .9rem 0 clamp(1.65rem, 4.5vw, 2.6rem);
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}
.editor {
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: .7rem;
}
.editor-heading, .editor-actions, .viewer-actions {
  display: flex;
  gap: .8rem;
  align-items: center;
  flex-wrap: wrap;
}
.editor-heading {
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--rule);
  justify-content: space-between;
}
.editor-heading label, .editor-heading strong, .share-label {
  font-size: .94rem;
  font-weight: 650;
}
.bytes { font: .81rem/1.45 var(--mono); color: var(--muted); }
.bytes[data-over="true"], .notice { color: #ffb094; }
textarea, .paste-body {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.1rem 1.15rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: 1rem/1.65 var(--mono);
}
textarea {
  min-height: 12rem;
  height: clamp(13rem, 32vh, 19rem);
  resize: vertical;
  border-radius: 0;
}
textarea:focus-visible { outline-offset: -3px; }
textarea::placeholder { color: #a8a195; opacity: 1; }
.paste-body { min-height: 6rem; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
code { font: inherit; }
.editor-actions {
  border-top: 1px solid var(--rule);
  padding: .9rem 1.15rem;
  justify-content: flex-end;
}
button, .new-link, .viewer-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 2.8rem;
  padding: .6rem 1.05rem;
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
}
button, .viewer-new {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #837a68;
  border-radius: .4rem;
  cursor: pointer;
}
button:hover, .viewer-new:hover { border-color: var(--amber); }
button.primary { background: var(--amber); border-color: var(--amber); color: #201710; }
button.primary:hover { background: #ffd188; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
.new-link { padding-inline: 0; text-underline-offset: .24em; }
.share-label { display: block; margin: 1.6rem 0 .45rem; }
.share-input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: .4rem;
  background: var(--surface);
  color: var(--ink);
  padding: .75rem .9rem;
  font: 1rem/1.4 var(--mono);
}
.viewer-actions { margin-block: 1rem; }
.viewer-new { margin-inline-start: auto; text-decoration: none; }
.notice { font-weight: 550; }
.editor .notice { margin: .3rem 1.15rem 1.1rem; }
.viewer-actions .copy-status { flex-basis: 100%; margin: 0; color: var(--muted); }
/* Keep the empty live region available without reserving another flex row. */
.viewer-actions .copy-status:empty { position: absolute; }
@media (max-width: 28rem) {
  :root { --pane-width: calc(100% - 2rem); }
  .mast { padding-top: .95rem; }
  .mast-tools { flex: 1 0 100%; justify-content: space-between; font-size: .8rem; }
  .editor-actions button { width: 100%; }
  .editor-heading { padding-inline: .85rem; }
  .viewer-actions { gap: .5rem; }
  .viewer-new { margin-inline-start: 0; }
  .viewer-actions :is(button, .viewer-new) { padding-inline: .65rem; }
}
.preview-strip {
  width: var(--pane-width);
  margin: 1.25rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.2rem;
  align-items: center;
  color: var(--muted);
  font-size: .86rem;
}
.preview-strip nav { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.metrics { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.metrics dt { color: var(--muted); font-size: .9rem; }
.metrics dd { margin: .25rem 0 0; font: 1.05rem var(--mono); }
.admin-section { border-top: 1px solid var(--rule); padding: 1rem 0; margin-top: 1.8rem; }
.admin-section h2 { margin: .5rem 0 1rem; font-size: 1.3rem; }
.admin-section table { border-collapse: collapse; width: min(100%, 27rem); }
.admin-section th, .admin-section td { text-align: left; padding: .35rem .8rem .35rem 0; }
.admin-section td { font-family: var(--mono); }
.admin-section label { display: block; margin-bottom: .5rem; }
/* A drag past the last letter can then end outside the label with JavaScript off. */
#delete-snippet label { width: fit-content; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.paste-list {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.paste-list th, .paste-list td { padding: .8rem .6rem; border-bottom: 1px solid var(--rule); }
.paste-list th { background: var(--surface); font-size: .9rem; }
.paste-list td { font: .95rem/1.6 var(--mono); }
.paste-list th:nth-child(3), .paste-list .row-bytes { text-align: right; }
.dim { color: var(--muted); }
.paste-pages { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 1rem; }
.paste-pages a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.row-actions button, .row-actions a { min-height: 2.75rem; font-size: .9rem; }
.row-actions a { display: inline-flex; align-items: center; padding: .3rem .55rem; }
.row-feedback { display: block; color: var(--muted); font: .85rem/1.4 system-ui, sans-serif; }
.admin-body .paste-body { max-height: min(55vh, 32rem); overflow: auto; }
.admin-body + .confirm-actions { margin-top: 1.25rem; }
.confirmation-url { -webkit-user-select: all; user-select: all; }
.confirm-actions { display: flex; align-items: center; gap: 1.25rem; }
.theme-guide {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 1rem;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.theme-card-banner { display: block; width: 100%; aspect-ratio: 576 / 104; object-fit: cover; }
.theme-card h2 { margin: 1rem 1rem .3rem; font-size: 1.4rem; line-height: 1.2; }
.theme-card p { margin: .25rem 1rem .65rem; }
.theme-card a { display: inline-flex; align-items: center; min-height: 2rem; margin: auto 1rem 0; }
@media (max-width: 43rem) {
  .paste-list tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; }
  .paste-list :is(thead, tbody) { display: block; }
  .paste-list .row-action-heading { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); }
  .paste-list th, .paste-list td { padding: .7rem .28rem; }
  .paste-list td { font-size: .83rem; border-bottom: 0; }
  .paste-list .row-actions { grid-column: 1 / -1; padding-top: 0; border-bottom: 1px solid var(--rule); }
}

.slug-field { padding: .85rem 1.15rem; border-bottom: 1px solid var(--rule); }
.slug-field label { font-weight: 650; }
.slug-field p { margin: .35rem 0 .6rem; color: var(--muted); }
