@font-face {
  font-family: 'PN Sans';
  src: url('/fonts/pn-type-family/PNSans-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'PN Sans';
  src: url('/fonts/pn-type-family/PNSans-Medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'PN Sans';
  src: url('/fonts/pn-type-family/PNSans-Bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f4f8fa;
  --panel: #ffffff;
  --line: #d7e6ed;
  --ink: #17333d;
  --muted: #56717c;
  --brand: #0a6e8a;
  --brand-soft: #dff4fb;
  --brand-deep: #003b5c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PN Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgb(0 126 168 / 0.12), transparent 24%),
    var(--bg);
}

.top-ribbon {
  padding: 0.42rem 1rem;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 33px);
}

.sidebar {
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(12px);
}

.main {
  padding: 1.25rem;
}

.brand,
.card {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgb(0 52 75 / 0.08);
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgb(0 59 92 / 0.22);
  margin-bottom: 0.75rem;
}

.card.small ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.link-list {
  padding-left: 1.25rem;
  margin: 0;
}

.link-list a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pending-warning {
  margin: 0.4rem 0 0;
  color: #9b4f00;
  font-size: 0.92rem;
  font-weight: 600;
}

.source-badge {
  display: inline-flex;
  margin: 0.45rem 0 0;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #eef6f9;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.85rem;
  font-weight: 600;
}

input,
textarea,
button {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid #bfd6e0;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  width: auto;
  cursor: pointer;
  background: var(--brand);
  color: white;
  border: none;
  font-weight: 700;
}

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

button.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid #bfd6e0;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
}

.page-list {
  display: grid;
  gap: 0.5rem;
}

.page-list button {
  width: 100%;
  text-align: left;
  background: #f7fbfc;
  color: var(--ink);
  border: 1px solid var(--line);
}

.page-list button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.steps-header,
.step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.steps-container {
  display: grid;
  gap: 1rem;
}

.media-bank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.media-item {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fcfd;
}

.media-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.media-item code {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  word-break: break-word;
}

.step-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f9fcfd;
}

.step-card input[readonly] {
  background: #f1f7fa;
  color: var(--muted);
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.upload-panel .hint {
  grid-column: 1 / -1;
  margin: 0;
}

.hint.error {
  color: #9b1c1c;
}

.hint.success {
  color: #0b6b38;
}

.hint {
  margin-top: -0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.step-preview {
  margin: 0;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
}

.step-image-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #f4f8fa;
}

.step-preview-caption {
  margin-top: 0.6rem;
}

.help-shell {
  max-width: 900px;
  margin: 1.25rem auto;
  padding: 0 1rem 2rem;
}

.help-page {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgb(0 52 75 / 0.08);
}

.help-page h1 {
  margin-top: 0.1rem;
}

.help-page h2 {
  margin-top: 1.25rem;
}

.help-page ul,
.help-page ol {
  padding-left: 1.25rem;
}

.help-page code {
  background: #eef6f9;
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}

.help-nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.help-nav a {
  color: var(--brand-deep);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }
}
