:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1c241b;
  --muted: #5a6358;
  --accent: #2f6b4c;
  --accent-ink: #ffffff;
  --border: #d9dcd4;
  --shadow: 0 1px 2px rgba(28, 36, 27, 0.06), 0 4px 12px rgba(28, 36, 27, 0.05);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand h1 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink);
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.builder, .preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.builder-intro {
  color: var(--muted);
  margin-top: 0;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"], textarea, select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

input[type="text"]:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}

.aisle-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aisle-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: #f0f2ec;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
}

.aisle-list li.dragging {
  opacity: 0.5;
}

.aisle-list li.drag-over {
  border-color: var(--accent);
  background: #e4efe8;
}

.aisle-list .drag-handle {
  color: var(--muted);
  font-size: 0.9rem;
  cursor: grab;
}

.aisle-list .aisle-name {
  flex: 1;
}

.aisle-list .aisle-actions {
  display: flex;
  gap: 0.25rem;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: #265a3f;
  border-color: #265a3f;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #eef0ea;
  border-color: #c4c8bd;
}

.btn-tertiary {
  color: var(--muted);
  text-decoration: underline;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.btn-tertiary:hover {
  color: var(--ink);
}

.btn-icon {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  border-color: var(--border);
  background: var(--surface);
}

.btn-icon:hover {
  background: #eef0ea;
}

.add-aisle {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.add-aisle input {
  flex: 1;
}

.item-entry {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.item-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: #f9faf7;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.item-row .item-name {
  flex: 1;
}

.item-row select {
  width: auto;
  min-width: 140px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.2em;
}

.route-preview {
  background: #fbfcf8;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  min-height: 200px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.route-step {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.route-step:last-child {
  border-bottom: none;
}

.route-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.route-step .step-body {
  flex: 1;
}

.route-step .step-aisle {
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
}

.route-step .step-items {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.presets {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.presets h3 {
  width: 100%;
  margin-bottom: 0.25rem;
}

.route-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.scenario-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.comparison-col {
  background: #f9faf7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.comparison-col h3 {
  margin-top: 0;
}

.comparison-col ul {
  margin: 0;
  padding-left: 1.2rem;
}

.comparison-col li {
  margin-bottom: 0.4rem;
}

.notes-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.notes-list {
  padding-left: 1.2rem;
  margin: 0 0 1.5rem;
}

.notes-list li {
  margin-bottom: 0.6rem;
}

.last-updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.footer-note {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

@media (max-width: 820px) {
  .planner-grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    padding: 1rem;
  }
  main {
    padding: 1.25rem 1rem 2rem;
  }
  .builder, .preview, .scenario-section, .notes-section {
    padding: 1.25rem;
  }
}

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .actions, .presets, .scenario-section, .notes-section, .add-aisle, .item-entry, .btn-icon, #status { display: none; }
  .planner-grid { grid-template-columns: 1fr; }
  .route-preview { border: none; padding: 0; }
  .builder { border: none; box-shadow: none; padding: 0; }
  main { padding: 0; max-width: 100%; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
