:root {
  --bg: #f3efe5;
  --surface: rgba(255, 252, 246, 0.84);
  --surface-strong: #fffaf2;
  --ink: #1c1a17;
  --muted: #6d665d;
  --line: rgba(28, 26, 23, 0.12);
  --accent: #0f766e;
  --accent-strong: #0a4f4a;
  --alert: #a63a2d;
  --shadow: 0 18px 44px rgba(55, 39, 15, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(166, 58, 45, 0.12), transparent 24%),
    linear-gradient(180deg, #efe7d7 0%, var(--bg) 42%, #e6dcc9 100%);
  min-height: 100vh;
}

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

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy,
.hero-panel,
.card,
.entry-card,
.artefact-item {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 2rem;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.4rem;
  border: 1px solid var(--line);
}

.hero h1,
.section-head h2,
.card h2,
.card h3 {
  margin: 0;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  max-width: 12ch;
}

.hero-text {
  margin: 1rem 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.panel-note {
  margin: 0 0 0.9rem;
  color: var(--accent-strong);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 700;
  padding: 0.8rem 0.95rem;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
}

.eyebrow,
.panel-label,
.artefact-stage,
.entry-question {
  margin: 0 0 0.5rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-panel {
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 250, 242, 0.92)),
    var(--surface);
}

.hero-list,
.plain-list,
.task-list {
  margin: 0;
  padding-left: 1.2rem;
}

.hero-list li,
.plain-list li,
.task-list li {
  margin: 0.55rem 0;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.tab-button,
.primary-button,
.ghost-button,
.delete-button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.tab-button {
  background: rgba(255, 250, 242, 0.72);
  color: var(--ink);
  border: 1px solid rgba(28, 26, 23, 0.08);
}

.tab-button.active,
.primary-button {
  background: var(--accent);
  color: white;
}

.ghost-button {
  background: rgba(255, 250, 242, 0.8);
  color: var(--ink);
  border: 1px solid rgba(28, 26, 23, 0.1);
}

.ghost-button.danger,
.delete-button {
  color: var(--alert);
}

.tab-button:hover,
.primary-button:hover,
.ghost-button:hover,
.delete-button:hover {
  transform: translateY(-1px);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: rise 220ms ease;
}

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

.grid {
  display: grid;
  gap: 1rem;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.card {
  padding: 1.4rem;
}

.team-card {
  margin-bottom: 1rem;
}

.card-head,
.section-head,
.entries-header,
.entry-top,
.artefact-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.callout {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(28, 26, 23, 0.04);
}

.callout-title {
  margin: 0 0 0.2rem;
  font-weight: 700;
}

.section-head,
.entries-header {
  margin: 0.6rem 0 1rem;
}

.entry-form-card {
  margin-bottom: 1rem;
}

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

.form-grid label {
  display: grid;
  gap: 0.45rem;
}

.full-span {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.entries,
.artefact-list {
  display: grid;
  gap: 1rem;
}

.entry-card,
.artefact-item {
  padding: 1.2rem;
}

.entry-problem {
  margin-top: 0;
}

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

.entry-details dt {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.entry-details dd {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.delete-button {
  padding: 0.55rem 0.9rem;
  background: rgba(166, 58, 45, 0.08);
}

.tracker-card {
  padding-top: 1.1rem;
}

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

.artefact-location,
.artefact-purpose {
  margin: 0.4rem 0;
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.toggle input {
  width: auto;
}

.generated-panel {
  display: grid;
  gap: 0.8rem;
}

.report-header {
  margin-bottom: 1rem;
}

.report-header,
.report-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.report-header-brand,
.report-footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border: 1px solid var(--line);
}

.report-footer-title,
.report-footer-subtitle,
.report-footer-rights {
  margin: 0;
}

.report-footer-title {
  font-weight: 700;
}

.report-footer-subtitle,
.report-footer-rights {
  color: var(--muted);
}

.report-footer-rights a {
  color: inherit;
}

.site-footer {
  margin-top: 1.5rem;
  padding: 0.25rem 0 0;
}

.generated-block {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(28, 26, 23, 0.04);
}

.generated-block h4 {
  margin: 0 0 0.4rem;
}

.generated-block p,
.generated-block li {
  color: var(--muted);
}

.generated-block ul {
  margin: 0;
  padding-left: 1.2rem;
}

@media print {
  body {
    background: white;
  }

  .tab-bar,
  .toolbar,
  #entry-form,
  #artefact-search,
  #add-entry,
  .delete-button,
  .toggle,
  .hero-panel,
  .site-footer {
    display: none !important;
  }

  .tab-panel {
    display: block !important;
  }

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

  .hero-copy,
  .card,
  .entry-card,
  .artefact-item {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
  }
}

@media (max-width: 860px) {
  .hero,
  .two-up,
  .form-grid,
  .entry-details {
    grid-template-columns: 1fr;
  }

  .section-head,
  .toolbar,
  .entries-header,
  .entry-top,
  .artefact-head,
  .report-header,
  .report-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-shell {
    width: min(100% - 1rem, 1200px);
    padding-top: 1rem;
  }
}
