:root {
  --bg: radial-gradient(circle at 20% 20%, #fff6de, #f5f8f7 60%, #e6efe8 100%);
  --ink: #1f2933;
  --primary: #1f5f57;
  --secondary: #f0c64e;
  --panel: #ffffff;
  --border: #d8e1de;
  --danger: #a3173a;
  --success: #0d6f52;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
}

.ake-shell {
  max-width: 820px;
  margin: 2rem auto;
  padding: 1.25rem;
}

h1 {
  margin-bottom: 0.25rem;
}

.lead {
  margin-top: 0;
  color: #30424f;
}

.wizard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.step {
  margin-bottom: 1rem;
}

label,
legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

input[type='file'] {
  background: #ffffff;
  padding: 0.45rem;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.upload-trigger {
  margin-right: 0;
}

.upload-selected {
  color: #30424f;
  font-size: 0.92rem;
}

textarea {
  min-height: 100px;
}

.hint {
  margin: 0.45rem 0 0;
  color: #4a5e68;
  font-size: 0.93rem;
}

.upload-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.upload-empty {
  color: #5b6c73;
  font-size: 0.94rem;
}

.upload-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fbfcfb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.upload-item-error {
  border-color: #e7b4c1;
  background: #fff6f8;
}

.upload-meta {
  min-width: 0;
}

.upload-name,
.upload-state {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.35;
}

.upload-state {
  margin-top: 0.15rem;
}

.upload-actions {
  flex-shrink: 0;
}

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

.status-success {
  color: var(--success);
}

.link-button {
  border: 0;
  background: transparent;
  color: #1f5f57;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.consent-row label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0;
  font-weight: 500;
}

.consent-row input[type='checkbox'] {
  width: auto;
  margin-top: 0.2rem;
  padding: 0;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 0.5rem;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

button.primary {
  background: var(--primary);
  color: #fff;
}

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

button.secondary {
  background: #e7ecea;
  color: #17323a;
}

.result {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

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

.report-section h2 {
  margin-bottom: 0.4rem;
}

.studio {
  border-left: 4px solid var(--secondary);
  padding-left: 0.8rem;
}

.funnel {
  border: 1px solid #d8e4de;
  border-radius: 12px;
  padding: 0.9rem;
  background: #f7fbf8;
}

.funnel-steps {
  margin: 0.6rem 0 0.75rem;
  padding-left: 1.25rem;
}

.funnel-steps li {
  margin-bottom: 0.55rem;
}

.funnel-steps p {
  margin: 0.2rem 0 0;
}

.pdf-block {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.lead-options {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.option-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0;
}

.option-checkbox input[type='checkbox'] {
  width: auto;
  margin: 0;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 0.08rem;
}

.info-button {
  margin-right: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  padding: 0;
  background: #eff3f2;
  border: 1px solid #c8d3d0;
  color: #1b4140;
  font-size: 0.78rem;
  line-height: 1;
}

.tooltip-content {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 0.8rem;
  width: min(430px, calc(100vw - 1rem));
  max-height: min(62vh, 430px);
  overflow: auto;
  background: #17323a;
  color: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  --tooltip-shift-x: -50%;
  --tooltip-shift-y: 4px;
  transform: translate(var(--tooltip-shift-x), var(--tooltip-shift-y));
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 9999;
}

.info-tooltip:hover .tooltip-content,
.info-tooltip:focus-within .tooltip-content {
  opacity: 1;
  visibility: visible;
  --tooltip-shift-y: 0;
}

.pdf-fields {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.success-message {
  color: var(--success);
  margin: 0.5rem 0 0;
  font-weight: 600;
}

#form-error,
#pdf-error {
  color: var(--danger);
  margin: 0.5rem 0 0;
  font-weight: 600;
}

@media (max-width: 700px) {
  .ake-shell {
    margin: 0.5rem auto;
    padding: 0.75rem;
  }

  .upload-item {
    flex-direction: column;
  }

  .tooltip-content {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 0.65rem;
    width: min(92vw, 420px);
    --tooltip-shift-x: -50%;
  }
}
