:root {
  --bg: #ffffff;
  --text: #2b2b2f;
  --muted: #9399a5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

body,
input,
textarea,
button {
  font-family: Georgia, "Times New Roman", serif;
}

.page-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 72px 32px 48px;
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: 56px;
  align-items: start;
}

.page-main {
  min-width: 0;
}

.page-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid #e4e5e8;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.page-footer__link {
  color: #5e6470;
  text-decoration: none;
}

.page-footer__link:hover {
  color: #2b2b2f;
  text-decoration: underline;
}

.title-wrap {
  margin-bottom: 18px;
}

.title-input,
.author-input,
.story-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  outline: none;
}

.title-input {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.author-wrap {
  margin-bottom: 18px;
}

.author-input {
  display: inline-block;
  width: auto;
  min-width: 18rem;
  font-size: 30px;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.story-input {
  min-height: clamp(280px, 40svh, 420px);
  resize: none;
  font-size: 22px;
  line-height: 1.7;
}

.title-input::placeholder,
.author-input::placeholder,
.story-input::placeholder {
  color: var(--muted);
}

.title-input--ghost,
.author-input--ghost,
.story-input--ghost {
  cursor: text;
}

.page-tools {
  justify-self: end;
  display: grid;
  gap: 18px;
  padding-top: 12px;
  text-align: right;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-account {
  min-height: 1.2em;
  font-size: 20px;
}

.account-link {
  color: inherit;
  text-decoration: none;
}

.account-link--button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.account-link--button:hover {
  text-decoration: underline;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 24px;
  border: 4px solid #2e2e2e;
  border-radius: 999px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: #fff;
  color: #111;
}

.action-pill--button {
  appearance: none;
  cursor: pointer;
}

.status-inline {
  min-height: 1.25rem;
  color: #8b92a0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 20px 72px;
  }

  .page-tools {
    justify-self: start;
    text-align: left;
  }

  .page-footer {
    margin-top: 0;
  }

  .author-input {
    font-size: 28px;
    min-width: 0;
  }
}
