@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --paper: #08080a;
  --ink: #eae5db;
  --ink-soft: #b3ada1;
  --ink-faint: #847e74;
  --rule: #1c1c20;
  --rule-bright: #2b2b32;
  --moon: #cfd6e2;
  --danger: #d98b7f;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #2a2a31 transparent;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: #2a2a31;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #3a3a44;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(64rem 32rem at 50% -22%, rgba(150, 172, 208, 0.09), transparent 70%),
    radial-gradient(38rem 22rem at 92% 108%, rgba(190, 152, 118, 0.05), transparent 72%);
}

body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
}

::selection {
  background: rgba(207, 214, 226, 0.18);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(207, 214, 226, 0.5);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.page {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.6rem 1.5rem 6rem;
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.4rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--rule);
}

.bar h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.quiet {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: 400 0.66rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}

.quiet:hover {
  color: var(--ink-soft);
}

.composer {
  position: relative;
  padding: 1.15rem 1.2rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: linear-gradient(180deg, #101014, #0c0c0f 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 28px 56px -40px #000;
  transition: border-color 0.3s ease, box-shadow 0.35s ease;
}

.composer:focus-within {
  border-color: #31313a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(207, 214, 226, 0.07),
    0 30px 64px -38px #000;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 7.2rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.07rem;
  line-height: 1.68;
  resize: vertical;
  caret-color: var(--moon);
}

.composer textarea:focus {
  outline: none;
}

.composer textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.composer-foot {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #17171b;
}

.error {
  flex: 1;
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
  line-height: 1.4;
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: auto;
}

.hint {
  display: inline-flex;
  gap: 0.25rem;
  color: var(--ink-faint);
}

kbd {
  padding: 0.08rem 0.3rem;
  border: 1px solid var(--rule-bright);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  font: 400 0.64rem/1.4 var(--mono);
  color: var(--ink-faint);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 1.1rem;
  border: 1px solid var(--rule-bright);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink-soft);
  font: 400 0.68rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.12s ease;
}

.pill:hover:not(:disabled) {
  border-color: rgba(207, 214, 226, 0.36);
  background: rgba(207, 214, 226, 0.06);
  color: var(--ink);
}

.pill:active:not(:disabled) {
  transform: translateY(1px);
}

.pill:disabled {
  opacity: 0.45;
  cursor: default;
}

.pill svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.list {
  position: relative;
  margin-top: 2.9rem;
}

.list::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45rem;
  bottom: 0.3rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--rule-bright), #17171b 55%, transparent);
}

.entry {
  position: relative;
  padding: 0 0 2.15rem 1.85rem;
}

.entry::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.42rem;
  width: 7px;
  height: 7px;
  border: 1px solid #3b3b44;
  border-radius: 50%;
  background: var(--paper);
}

.entry:first-child::before {
  border-color: var(--moon);
  background: var(--moon);
  box-shadow: 0 0 0 4px rgba(207, 214, 226, 0.07);
}

.entry .text {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.entry-head {
  margin-top: 0.6rem;
  font: 400 0.65rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-faint);
  font-size: 0.85rem;
}

#empty {
  margin: 3.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
  color: var(--ink-faint);
}

#end {
  margin: 2.6rem 0 0;
  font: 400 0.64rem/1 var(--mono);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-faint);
}

#end::before {
  content: "\00b7 \00b7 \00b7";
  display: block;
  margin-bottom: 0.85rem;
  letter-spacing: 0.5em;
  color: #3a3631;
}

.more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.6rem;
}

.centered {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.login {
  width: min(21rem, 100%);
  padding: 2.1rem 1.6rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: linear-gradient(180deg, #101014, #0b0b0e 75%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 32px 64px -44px #000;
}

.login h1 {
  margin: 0 0 1.7rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.login input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule-bright);
  border-radius: 11px;
  background: #08080b;
  color: var(--ink);
  font: 400 0.95rem/1.4 var(--sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login input::placeholder {
  color: #5d5850;
}

.login input:focus {
  outline: none;
  border-color: rgba(207, 214, 226, 0.4);
  box-shadow: 0 0 0 3px rgba(207, 214, 226, 0.07);
}

.login .pill {
  justify-content: center;
  padding: 0.62rem 1rem;
}

.login .error {
  flex: none;
  text-align: center;
}

.login p {
  margin: 0.9rem 0 0;
}

.link {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: #3a3a42;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--moon);
}

@media (prefers-reduced-motion: no-preference) {
  .bar,
  .composer {
    animation: settle 0.7s cubic-bezier(0.22, 0.7, 0.24, 1) both;
  }

  .composer {
    animation-delay: 0.06s;
  }

  .entry {
    animation: rise 0.5s cubic-bezier(0.22, 0.7, 0.24, 1) both;
  }

  .entry:nth-child(2) {
    animation-delay: 0.05s;
  }

  .entry:nth-child(3) {
    animation-delay: 0.1s;
  }

  .entry:nth-child(4) {
    animation-delay: 0.15s;
  }

  .entry:nth-child(5) {
    animation-delay: 0.2s;
  }

  .entry:nth-child(6) {
    animation-delay: 0.25s;
  }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

@media (max-width: 30rem) {
  .page {
    padding: 1.8rem 1.15rem 4.5rem;
  }

  .composer {
    padding: 1rem 1rem 0.8rem;
    border-radius: 16px;
  }

  .entry {
    padding-left: 1.55rem;
  }

  .hint {
    display: none;
  }
}
