:root {
  --bg: #f4f1ea;
  --panel: #fffdf7;
  --ink: #202124;
  --muted: #666057;
  --line: #d9d0c3;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #d7f0ec;
  --warning: #8a5a00;
  --shadow: 0 16px 40px rgba(34, 30, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(138, 90, 0, 0.1), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.controls-panel {
  position: sticky;
  top: 24px;
  padding: 18px;
}

.brand {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 11px;
  align-items: center;
  margin-bottom: 14px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fffdf7;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

.brand p,
.output-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}


.mini-pitch {
  display: grid;
  gap: 4px;
  margin: -6px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf6eb;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.mini-pitch strong {
  color: var(--ink);
}
.form {
  display: grid;
  gap: 11px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


.form-tip {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.form-tip strong {
  color: var(--ink);
}
.actions,
.tool-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions {
  position: sticky;
  bottom: 0;
  margin: 0 -18px -18px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(8px);
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 11px 14px;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary,
button.icon-button {
  background: #ebe4d8;
  color: var(--ink);
}

button.secondary:hover,
button.icon-button:hover {
  background: #ded4c5;
}

.output-panel {
  min-height: calc(100vh - 64px);
  overflow: hidden;
}

.output-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.document {
  padding: 22px;
  line-height: 1.58;
}

.document h3 {
  margin-top: 24px;
  font-size: 18px;
}

.document h3:first-child {
  margin-top: 0;
}

.document ul,
.document ol {
  padding-left: 22px;
}

.document li {
  margin: 6px 0;
}

.empty-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 12px 14px;
}

.warning {
  border-left-color: var(--warning);
  background: #fff2cf;
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    padding: 10px 0;
  }

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

  .controls-panel {
    position: static;
  }

  .output-panel {
    min-height: 520px;
  }

  .output-toolbar {
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .controls-panel,
  .tool-buttons {
    display: none;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }
}

.pack-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(215, 240, 236, 0.9), rgba(255, 246, 230, 0.78));
}

.pack-hero span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pack-hero strong {
  font-size: 28px;
  line-height: 1.1;
}

.pack-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.pack-grid div,
.snippet {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.pack-grid span,
.snippet {
  color: var(--muted);
  font-size: 14px;
}

.pack-section {
  margin-top: 18px;
  padding-top: 4px;
}
/* Product polish layer */
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at 85% 4%, rgba(210, 162, 88, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(138, 90, 0, 0.10), transparent 30%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(32, 33, 36, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(32, 33, 36, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
}

button {
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
}

button:active {
  transform: translateY(1px) scale(0.98);
}

.document.is-generated {
  animation: revealDocument 360ms ease both;
}

@keyframes revealDocument {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .pack-grid {
    grid-template-columns: 1fr;
  }
}
.preset-panel {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(215, 240, 236, 0.46);
}

.preset-panel span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preset-button {
  min-height: 38px;
  background: #fffdf7;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 8px;
}

.preset-button:hover {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 520px) {
  .preset-buttons {
    grid-template-columns: 1fr;
  }
}