:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #102018;
  --muted: #5f6f68;
  --line: #d8e3dd;
  --accent: #14532d;
  --accent-2: #0f766e;
  --warn-bg: #fff7ed;
  --warn-line: #fed7aa;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  background: linear-gradient(135deg, #f0fdf4, #ffffff 62%, #eef8f5);
}

.eyebrow,
.hint {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 11vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.summary,
.hint,
li {
  line-height: 1.55;
}

.summary {
  margin-bottom: 0;
  color: #2f4038;
}

.status-pill {
  white-space: nowrap;
  border: 1px solid #b7dfc9;
  color: var(--accent);
  background: #ecfdf5;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.compliance {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

ul {
  padding-left: 18px;
  margin: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #24352d;
  font-weight: 700;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.flow {
  display: grid;
  gap: 10px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
}

label {
  font-weight: 750;
}

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

textarea:focus,
input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

button {
  cursor: pointer;
}

.primary,
.ghost,
.save-link {
  min-height: 48px;
  border-radius: 8px;
  border: 0;
  font-weight: 800;
}

.primary,
.save-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
}

.ghost {
  background: #eef3f0;
  color: #1d3027;
  padding: 0 12px;
}

.result-header,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-header {
  justify-content: space-between;
}

.message {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.message.error {
  color: var(--danger);
}

.preview {
  display: grid;
  gap: 12px;
}

.preview img,
.preview video {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
  background: #0f172a;
}

.embed-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.actions {
  flex-wrap: wrap;
  margin-top: 14px;
}

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

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