.studio-body {
  min-height: 100vh;
  background: #e9ebe4;
}
.studio-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0.65rem max(1rem, calc((100vw - 1400px) / 2));
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.studio-nav nav,
.studio-nav form {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.studio-nav nav > a,
.link-button {
  color: #c6d3ce;
  font-size: 0.82rem;
}
.link-button {
  padding: 0.7rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.button.small {
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
}
.button.ghost {
  background: transparent;
  border-color: var(--line);
}
.studio-nav .button.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}
.studio-main {
  width: min(1400px, calc(100% - 2rem));
  margin: auto;
  padding: 4rem 0;
}
.studio-title,
.editor-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}
.studio-title span,
.editor-top span,
.panel-kicker,
.panel-head span,
.login-card > span {
  font: 500 0.7rem var(--mono);
  letter-spacing: 0.12em;
  color: #66736e;
}
.studio-title h1,
.editor-top h1 {
  margin: 0.25rem 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}
.studio-title p {
  margin: 0;
  color: var(--muted);
}
.notice {
  max-width: 900px;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
}
.notice.success {
  color: #184d33;
  background: #dff6e5;
  border: 1px solid #9fd5ae;
}
.notice.error {
  color: #762c26;
  background: #fee1dd;
  border: 1px solid #e9a59e;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 190px auto;
  gap: 0.6rem;
  margin: 1.5rem 0;
}
.filter-bar input,
.filter-bar select,
.filter-bar button,
.panel input,
.panel textarea,
.panel select,
.upload-panel input {
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c8cec6;
  border-radius: 0.6rem;
  outline: none;
}
.filter-bar input:focus,
.panel input:focus,
.panel textarea:focus,
.panel select:focus,
.upload-panel input:focus {
  border-color: #6d9f45;
  box-shadow: 0 0 0 3px rgba(168, 255, 93, 0.28);
}
.filter-bar button {
  font-weight: 700;
  background: var(--signal);
  cursor: pointer;
}
.article-table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
}
.article-table th,
.article-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.article-table th {
  font: 500 0.68rem var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.article-table td:first-child {
  width: 45%;
  white-space: normal;
}
.article-table td strong,
.article-table td small {
  display: block;
}
.article-table td small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}
.article-table td:last-child a {
  font-weight: 700;
}
.status {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font: 600 0.68rem var(--mono);
  text-transform: uppercase;
}
.status.published {
  background: #ddf7ce;
  color: #29620e;
}
.status.draft {
  background: #e5e8e5;
  color: #57605c;
}
.status.scheduled {
  background: #d7f3fa;
  color: #176474;
}
.status.archived {
  background: #ffe0dc;
  color: #884039;
}
.table-empty {
  text-align: center !important;
  color: var(--muted);
}
.editor-shell {
  width: min(1500px, calc(100% - 2rem));
  margin: auto;
  padding: 2rem 0 6rem;
}
.editor-top {
  align-items: center;
}
.editor-top > div:first-child {
  display: grid;
  gap: 0.25rem;
}
.editor-top > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.editor-top a:first-child {
  font-size: 0.8rem;
  color: var(--muted);
}
.editor-top h1 {
  font-size: 2.6rem;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
}
.editor-main,
.editor-side {
  display: grid;
  align-content: start;
  gap: 1rem;
}
.panel {
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 5px 18px rgba(6, 16, 13, 0.035);
}
.panel label,
.upload-panel label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #35433e;
}
.panel input,
.panel textarea,
.panel select {
  width: 100%;
  resize: vertical;
  font-weight: 400;
}
.panel .headline-input {
  min-height: 64px;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.panel-head h2 {
  margin: 0.15rem 0;
  font-size: 1.35rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.toolbar button {
  min-width: 38px;
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  background: #f1f2ed;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  cursor: pointer;
}
.visual-editor {
  min-height: 600px;
  padding: clamp(1.2rem, 4vw, 3rem);
  font:
    1.08rem/1.75 Georgia,
    serif;
  background: #fbfaf6;
  border: 1px solid #c8cec6;
  border-radius: 0.7rem;
  outline: none;
}
.visual-editor:focus {
  border-color: #6d9f45;
  box-shadow: 0 0 0 3px rgba(168, 255, 93, 0.25);
}
.visual-editor h2,
.visual-editor h3 {
  font-family: var(--sans);
  line-height: 1.1;
}
.visual-editor h2 {
  font-size: 2rem;
}
.visual-editor .article-callout {
  padding: 1rem;
  background: #e4fbd2;
  border: 1px solid #b3dd8f;
  border-radius: 0.7rem;
  font-family: var(--sans);
}
.field-help {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.repeat-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 40px;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.repeat-row.links {
  grid-template-columns: 1fr 1.5fr 40px;
}
.repeat-row input,
.repeat-row textarea {
  margin: 0;
}
.repeat-row button {
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 1.3rem;
  cursor: pointer;
}
.editor-side .sticky {
  position: sticky;
  top: 80px;
}
.panel .check {
  display: flex;
  grid-template-columns: 20px 1fr;
  align-items: center;
}
.panel .check input {
  min-height: auto;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 100vh;
}
.login-shell > section {
  display: flex;
  flex-direction: column;
  padding: 4rem max(2rem, calc((100vw - 1100px) / 2));
  color: #fff;
  background:
    radial-gradient(
      circle at 70% 30%,
      rgba(168, 255, 93, 0.25),
      transparent 35%
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 47px,
      rgba(255, 255, 255, 0.04) 47px 48px
    ),
    var(--ink);
}
.login-copy {
  margin: auto 0;
}
.login-copy h1 {
  margin: 1rem 0;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.84;
  letter-spacing: -0.07em;
}
.login-copy h1 em {
  color: var(--signal);
  font-style: normal;
}
.login-copy p {
  max-width: 590px;
  color: #aab9b3;
  font-size: 1.1rem;
}
.login-card {
  align-self: center;
  width: min(440px, calc(100% - 2rem));
  margin: auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
}
.login-card h2 {
  margin: 0.5rem 0 1.5rem;
  font-size: 2rem;
  letter-spacing: -0.04em;
}
.login-card label {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
  font-size: 0.8rem;
  font-weight: 700;
}
.login-card input {
  min-height: 50px;
  padding: 0.8rem;
  border: 1px solid #c8cec6;
  border-radius: 0.6rem;
}
.button.full {
  width: 100%;
  margin-top: 0.5rem;
  border: 0;
}
.login-card small {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  text-align: center;
}
.revision-list {
  display: grid;
  gap: 0.6rem;
}
.revision-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}
.revision-list article div {
  display: flex;
  flex-direction: column;
}
.revision-list article span {
  font-size: 0.78rem;
  color: var(--muted);
}
.upload-panel {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 1rem;
  align-items: end;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.upload-panel label {
  margin: 0;
}
.upload-panel small {
  grid-column: 1/-1;
  color: var(--muted);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.media-grid article {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.media-grid img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.media-grid article > div {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}
.media-grid span,
.media-grid small {
  color: var(--muted);
  font-size: 0.75rem;
}
.media-grid code {
  overflow: hidden;
  padding: 0.5rem;
  background: #eef0eb;
  border-radius: 0.35rem;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .editor-side .sticky {
    position: static;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-shell > section {
    min-height: 48vh;
    padding: 2rem;
  }
  .login-copy {
    padding: 4rem 0 1rem;
  }
  .login-copy h1 {
    font-size: 4rem;
  }
  .login-card {
    margin: 2rem auto;
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .upload-panel {
    grid-template-columns: 1fr;
  }
  .upload-panel small {
    grid-column: auto;
  }
}
@media (max-width: 620px) {
  .studio-nav .brand span,
  .studio-nav nav > a:first-child {
    display: none;
  }
  .studio-nav nav {
    gap: 0.35rem;
  }
  .studio-nav {
    padding-inline: 0.5rem;
  }
  .studio-main,
  .editor-shell {
    width: calc(100% - 1rem);
    padding-top: 2rem;
  }
  .studio-title,
  .editor-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .editor-top > div:last-child {
    width: 100%;
  }
  .editor-top .button {
    flex: 1;
  }
  .filter-bar,
  .two-fields,
  .repeat-row,
  .repeat-row.links {
    grid-template-columns: 1fr;
  }
  .repeat-row button {
    width: 44px;
  }
  .visual-editor {
    min-height: 450px;
    padding: 1rem;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .revision-list article {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
  .login-shell > section {
    min-height: 42vh;
  }
  .login-copy h1 {
    font-size: 3.5rem;
  }
}
