@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Pixel Square";
  src: url("/fonts/GeistPixel-Square.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #000;
  --rule: #e5e5e5;
  --rule-2: #111;
  --blue: #026cfc;
  --font: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-pixel: "Geist Pixel Square", var(--font);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 32rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0.75rem;
}

header {
  text-align: center;
}

h1 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.meter {
  margin-top: 1.75rem;
}

.meter-bar {
  height: 3px;
  background: var(--rule);
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.5s ease;
}

.composer {
  position: relative;
  margin-top: 2.25rem;
}

textarea {
  display: block;
  width: 100%;
  resize: none;
  border: 1px solid var(--rule-2);
  background: #fff;
  padding: 0.5rem 2.5rem 2.25rem 0.75rem;
  font: inherit;
  line-height: 24px;
  color: inherit;
  overflow-y: auto;
}

textarea::-webkit-scrollbar {
  width: 2px;
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  background: #bbb;
}

textarea::placeholder {
  color: #666;
}

textarea:disabled {
  color: #666;
  cursor: not-allowed;
}

textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.lines {
  margin-top: 1.25rem;
}

.lines p {
  margin: 0 0 0.75rem;
}
