:root {
  color: #333;
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body { margin: 0; }

a { color: inherit; }

.page {
  max-width: 820px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 24px 28px 64px;
}

.narrow { max-width: 680px; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 96px;
}

.wordmark { font-size: 20px; text-decoration: none; }

.quiet-link, .text-button, .footer, .note, .source-label, label span {
  color: #666;
  font-size: 14px;
}

.quiet-link { text-decoration: none; }

h1 {
  margin: 0 0 32px;
  color: #888;
  font-size: 28px;
  font-weight: 400;
}

.source-form { display: block; }
.source-entry { display: flex; gap: 18px; align-items: center; }

input, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  color: #333;
  background: transparent;
  font: inherit;
  outline: none;
}

input { padding: 8px 0; font-size: 20px; }

input:focus, textarea:focus { border-bottom-color: #333; }

.button {
  flex: 0 0 auto;
  border: 1px solid #333;
  border-radius: 18px;
  padding: 7px 18px;
  color: #333;
  background: #fff;
  font: 600 14px system-ui, sans-serif;
  cursor: pointer;
}

.button-primary { background: #333; color: #fff; }
.button:hover, .bookmarklet:hover { opacity: .7; }

.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.source-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-button { border: 0; padding: 0; background: none; cursor: pointer; }

textarea {
  min-height: 420px;
  resize: vertical;
  border: 1px solid #eee;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.result-actions { display: flex; align-items: center; gap: 12px; }
.status { min-height: 1.5em; color: #777; font-size: 14px; }
.status.error { color: #a33; }

.footer { max-width: 820px; margin: 0 auto; padding: 0 28px 28px; }
.footer a { margin: 0 4px; }
.result .text-button { margin-top: 12px; }

.lede { color: #666; font-size: 18px; }
.bookmarklet-form { display: grid; gap: 14px; max-width: 460px; margin-top: 36px; }
.bookmarklet-form .button { justify-self: start; margin-top: 12px; }
.bookmarklet-instructions { max-width: 560px; margin: 28px 0 0; padding-left: 24px; }
.bookmarklet-instructions li { margin: 10px 0; padding-left: 4px; }
.bookmarklet-list { display: grid; gap: 16px; margin-top: 36px; }
.bookmarklet { display: inline-block; width: fit-content; border-bottom: 1px solid #333; padding-bottom: 4px; text-decoration: none; }
.note { margin-top: 36px; }

.about-list { margin: 32px 0; padding-left: 24px; }
.about-list li { margin: 14px 0; padding-left: 4px; }
pre { overflow-x: auto; margin: 24px 0; border: 1px solid #eee; padding: 16px; font-size: 14px; }

.page-list { margin: 36px 0 0; padding: 0; list-style: none; }
.page-item { border-top: 1px solid #eee; padding: 18px 0 20px; }
.page-title { font-size: 21px; text-decoration: none; }
.page-title:hover { text-decoration: underline; }
.page-details { display: flex; gap: 14px; margin-top: 6px; color: #777; font-size: 13px; }
.page-description { margin: 8px 0 0; color: #666; font-size: 15px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 560px) {
  .page { padding: 20px 20px 48px; }
  .masthead { margin-bottom: 64px; }
  h1 { font-size: 26px; }
  .source-entry { display: block; }
  .source-entry .button { margin-top: 22px; }
  .result-toolbar { align-items: flex-start; flex-direction: column; }
  .footer { padding: 0 20px 20px; }
}
