.fg-root,
.fg-root * {
  box-sizing: border-box;
}

.fg-root {
  --fg-bg: #020707;
  --fg-panel: rgba(2, 8, 6, .78);
  --fg-text: #f8fafc;
  --fg-muted: rgba(226, 232, 240, .72);
  --fg-green: #68ff8f;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  color: var(--fg-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fg-root button,
.fg-root textarea,
.fg-root input {
  font-family: inherit;
}

.fg-loading,
.fg-error {
  min-height: 60vh;
  display: grid;
  place-items: center;
  background: #020707;
  color: #fff;
  padding: 40px;
}

.fg-form-shell {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 70px);
  background:
    radial-gradient(circle at 50% 0%, rgba(104, 255, 143, .20), transparent 28%),
    radial-gradient(circle at 90% 70%, rgba(0, 255, 180, .10), transparent 30%),
    linear-gradient(135deg, #04120a 0%, #020707 54%, #030409 100%);
  overflow: hidden;
}

.fg-form-hero {
  max-width: 1120px;
  margin: 0 auto 36px;
}

.fg-eyebrow {
  margin: 0 0 10px;
  color: var(--fg-color, var(--fg-green));
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 12px;
  font-weight: 900;
}

.fg-form-hero h2,
.fg-step-title h2 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 80px);
  line-height: .92;
  color: #fff;
  text-shadow: 0 0 28px rgba(104, 255, 143, .16);
}

.fg-form-hero p,
.fg-step-title p {
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
}

.fg-step-title p strong {
  color: #fff;
}

.fg-gem-selector {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
}

.fg-gem-option {
  min-height: 255px;
  padding: 18px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--fg-rgb), .36);
  background:
    radial-gradient(circle at 50% 22%, rgba(var(--fg-rgb), .16), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(2, 8, 6, .72);
  color: #fff;
  cursor: pointer;
  text-align: center;
  white-space: normal !important;
  box-shadow: inset 0 0 24px rgba(var(--fg-rgb), .07);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.fg-gem-option:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--fg-rgb), .58);
  background:
    radial-gradient(circle at 50% 22%, rgba(var(--fg-rgb), .20), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    rgba(2, 8, 6, .78);
}

.fg-gem-option strong {
  display: block;
  width: 100%;
  max-width: 210px;
  margin: 18px auto 0;
  padding: 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.28;
  text-align: center;
  white-space: normal !important;
  overflow-wrap: break-word;
}

.fg-gem-option small {
  display: block;
  min-height: 34px;
  margin-top: 8px;
  color: rgba(255,255,255,.68);
  font-weight: 700;
  line-height: 1.35;
}

.fg-gem-image-wrap {
  width: 112px;
  height: 132px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  position: relative;
}

.fg-gem-image-wrap::before {
  content: "";
  position: absolute;
  inset: 18px 8px 8px;
  border-radius: 50%;
  background: rgba(var(--fg-rgb), .20);
  filter: blur(18px);
}

.fg-gem-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(var(--fg-rgb), .45));
}

.fg-step-shell {
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--fg-rgb), .20), transparent 30%),
    linear-gradient(135deg, rgba(var(--fg-rgb), .18), transparent 34%),
    linear-gradient(135deg, #04120a 0%, #020707 54%, #030409 100%);
}

.fg-step-header {
  width: min(1120px, 100%);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: 180px 1fr 140px;
  gap: 22px;
  align-items: center;
}

.fg-back,
.fg-form-actions button,
.fg-saved-actions button,
.fg-project-option button,
.fg-progress-periods button {
  border: 1px solid rgba(255,255,255,.20);
  color: #fff;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
}

.fg-back:hover,
.fg-form-actions button:hover,
.fg-project-option button:hover,
.fg-progress-periods button:hover {
  border-color: rgba(var(--fg-rgb), .58);
  background: rgba(255,255,255,.09);
}

.fg-mini-gem .fg-gem-image-wrap {
  transform: scale(.82);
}

.fg-progress {
  width: min(1120px, 100%);
  margin: 0 auto 18px;
  display: grid;
  gap: 10px;
}

.fg-progress-main,
.fg-progress-periods {
  grid-template-columns: repeat(3, 1fr);
}

.fg-progress span,
.fg-progress-periods button {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.58);
  text-align: center;
  font-weight: 900;
  letter-spacing: .05em;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.fg-progress-periods button {
  border-radius: 12px;
}

.fg-progress span.is-active,
.fg-progress-periods button.is-active {
  color: var(--fg-color);
  border-color: rgba(var(--fg-rgb), .74);
  box-shadow: inset 0 0 18px rgba(var(--fg-rgb), .10), 0 0 18px rgba(var(--fg-rgb), .10);
}

.fg-progress span.is-done,
.fg-progress-periods button.is-done {
  color: #fff;
  border-color: rgba(var(--fg-rgb), .38);
}

.fg-fields,
.fg-project-context {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(var(--fg-rgb), .40);
  background:
    linear-gradient(135deg, rgba(2, 8, 6, .82), rgba(2, 8, 6, .62)),
    radial-gradient(circle at top right, rgba(var(--fg-rgb), .14), transparent 34%);
  border-radius: 20px;
  box-shadow:
    0 0 40px rgba(var(--fg-rgb), .10),
    inset 0 0 34px rgba(255,255,255,.04);
}

.fg-project-context {
  margin-bottom: 14px;
  padding: 18px 22px 2px;
}

.fg-statement-example {
  margin-bottom: 20px;
  border: 1px solid rgba(var(--fg-rgb), .28);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.84);
  line-height: 1.55;
  overflow: hidden;
}

.fg-statement-example summary {
  cursor: pointer;
  padding: 16px 20px;
  color: var(--fg-color);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.fg-statement-example-content {
  padding: 0 20px 20px;
}

.fg-statement-example p {
  margin: 0 0 14px;
}

.fg-statement-example p:last-child {
  margin-bottom: 0;
}

.fg-statement-example strong {
  color: #fff;
}

.fg-field {
  display: block;
  margin-bottom: 18px;
}

.fg-field span {
  display: block;
  color: var(--fg-color);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.fg-field textarea,
.fg-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(var(--fg-rgb), .32);
  background: rgba(1, 8, 10, .76);
  color: #fff;
  padding: 14px 16px;
  outline: none;
  line-height: 1.55;
}

.fg-field textarea {
  min-height: 120px;
  resize: vertical;
}

.fg-field-statement textarea {
  min-height: 190px;
}

.fg-project-name-field {
  margin-bottom: 16px;
}

.fg-field textarea:focus,
.fg-field input:focus {
  border-color: rgba(var(--fg-rgb), .78);
  box-shadow: 0 0 0 3px rgba(var(--fg-rgb), .10);
}

.fg-field textarea::placeholder,
.fg-field input::placeholder {
  color: rgba(226,232,240,.42);
}

.fg-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fg-form-actions-end {
  justify-content: flex-end;
}

.fg-form-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.fg-primary,
.fg-form-actions .fg-primary,
.fg-project-option .fg-primary {
  background: var(--fg-color);
  color: #04120a;
  border-color: transparent;
}

.fg-status {
  width: min(1120px, 100%);
  margin: 16px auto 0;
  color: #bbf7d0;
  font-weight: 800;
}

.fg-inline-notice {
  width: min(1120px, 100%);
  margin: 0 auto 18px;
  padding: 15px 18px;
  border: 1px solid rgba(var(--fg-rgb), .48);
  border-radius: 14px;
  background: rgba(var(--fg-rgb), .10);
  color: #fff;
  font-weight: 800;
}

.fg-project-selector {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.fg-project-option {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(var(--fg-rgb), .34);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(var(--fg-rgb), .13), transparent 38%),
    rgba(2, 8, 6, .76);
  box-shadow: inset 0 0 26px rgba(var(--fg-rgb), .05);
}

.fg-project-option.has-data {
  border-color: rgba(var(--fg-rgb), .62);
}

.fg-project-option-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.fg-project-index,
.fg-project-status {
  color: var(--fg-color);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.fg-project-status {
  color: rgba(255,255,255,.72);
}

.fg-project-option h3 {
  margin: 22px 0 14px;
  color: #fff;
  font-size: 25px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.fg-project-option p {
  margin: 14px 0 22px;
  color: var(--fg-muted);
  line-height: 1.55;
}

.fg-project-option button {
  margin-top: auto;
  width: 100%;
}

.fg-project-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
}

.fg-project-meter span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--fg-color);
  box-shadow: 0 0 14px rgba(var(--fg-rgb), .55);
}

.fg-project-footer-actions {
  width: min(1120px, 100%);
  margin: 22px auto 0;
  display: flex;
  justify-content: flex-end;
}

/* Tablero */
.fg-board-root {
  min-height: 100vh;
  padding: clamp(22px, 3vw, 46px);
  background:
    radial-gradient(circle at 50% 0%, rgba(104, 255, 143, .24), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(104, 255, 143, .16), transparent 22%),
    linear-gradient(135deg, #021007 0%, #020605 50%, #041209 100%);
  overflow-x: auto;
}

.fg-board-frame {
  position: relative;
  min-width: 1620px;
  max-width: 1880px;
  margin: 0 auto;
  padding: 32px 34px 38px;
  border: 1px solid rgba(104, 255, 143, .42);
  background:
    linear-gradient(180deg, rgba(104, 255, 143, .055), transparent 18%),
    rgba(0, 12, 7, .72);
  box-shadow:
    0 0 0 1px rgba(104, 255, 143, .10),
    0 0 50px rgba(104, 255, 143, .13),
    inset 0 0 65px rgba(104, 255, 143, .07);
}

.fg-board-frame::before,
.fg-board-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(104, 255, 143, .22);
  pointer-events: none;
}

.fg-board-top-glow {
  position: absolute;
  left: 20%;
  right: 20%;
  top: -34px;
  height: 70px;
  border: 1px solid rgba(104, 255, 143, .28);
  border-radius: 0 0 50% 50%;
  border-top: 0;
  filter: drop-shadow(0 0 16px rgba(104,255,143,.46));
  opacity: .75;
}

.fg-board-header,
.fg-board-gem-group {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 145px minmax(245px, .9fr) 190px repeat(3, minmax(280px, 1fr));
  gap: 12px;
}

.fg-board-header {
  align-items: center;
  margin-bottom: 18px;
}

.fg-board-header h3 {
  position: relative;
  margin: 0;
  text-align: center;
  color: #85ff9e;
  font-size: 24px;
  letter-spacing: .06em;
  text-shadow: 0 0 18px rgba(104,255,143,.58);
}

.fg-board-header h3:nth-child(n+4):not(:last-child)::after {
  content: "»";
  position: absolute;
  right: -22px;
  color: #68ff8f;
  font-size: 25px;
  text-shadow: 0 0 18px rgba(104,255,143,.70);
}

.fg-board-list {
  position: relative;
  z-index: 1;
}

.fg-board-gem-group {
  grid-template-rows: repeat(3, minmax(205px, auto));
  padding: 14px 0;
  border-top: 1px solid rgba(var(--fg-rgb), .30);
}

.fg-board-gem-group:first-child {
  border-top: 0;
}

.fg-board-rowspan {
  grid-row: 1 / span 3;
}

.fg-gem-cell {
  min-height: 205px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  text-align: center;
  color: #fff;
  padding: 10px 0 16px;
}

.fg-board-gem-image-wrap {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.fg-board-gem-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(var(--fg-rgb), .50));
}

.fg-gem-cell strong {
  display: block;
  width: 100%;
  max-width: 135px;
  color: rgba(255,255,255,.88);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: normal !important;
  overflow-wrap: break-word;
}

.fg-board-card,
.fg-project-card {
  min-height: 205px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(var(--fg-rgb), .62);
  background:
    linear-gradient(135deg, rgba(var(--fg-rgb), .09), transparent 42%),
    rgba(1, 10, 6, .62);
  box-shadow:
    0 0 16px rgba(var(--fg-rgb), .14),
    inset 0 0 22px rgba(var(--fg-rgb), .04);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  overflow: hidden;
}

.fg-statement-card {
  background:
    linear-gradient(135deg, rgba(var(--fg-rgb), .13), transparent 44%),
    rgba(1, 10, 6, .72);
}

.fg-project-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.fg-project-card .fg-project-number {
  color: var(--fg-color);
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 900;
}

.fg-project-card strong {
  color: #fff;
  font-size: 19px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.fg-board-section {
  margin-bottom: 10px;
}

.fg-board-section:last-child {
  margin-bottom: 0;
}

.fg-board-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-color);
  text-transform: uppercase;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-shadow: 0 0 12px rgba(var(--fg-rgb), .38);
}

.fg-board-text {
  margin: 5px 0 0 32px;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

.fg-board-empty {
  margin: 5px 0 0 32px;
  color: rgba(255,255,255,.30);
  font-size: 11px;
  font-style: italic;
}

.fg-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.fg-icon-target {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.fg-icon-target::before,
.fg-icon-target::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.fg-icon-target::before {
  width: 2px;
  height: 26px;
  left: 8px;
  top: -5px;
}

.fg-icon-target::after {
  height: 2px;
  width: 26px;
  left: -5px;
  top: 8px;
}

.fg-icon-arrows::before {
  content: "»";
  color: currentColor;
  font-size: 31px;
  line-height: 18px;
  letter-spacing: -6px;
}

.fg-icon-bars {
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.fg-icon-bars::before,
.fg-icon-bars::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 3px;
  background: currentColor;
}

.fg-icon-bars::before {
  left: 6px;
  height: 9px;
}

.fg-icon-bars::after {
  left: 13px;
  height: 15px;
}

.fg-icon-statement {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.fg-icon-statement::before,
.fg-icon-statement::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
}

.fg-icon-statement::before {
  top: 6px;
}

.fg-icon-statement::after {
  top: 12px;
}

@media (max-width: 1180px) {
  .fg-gem-selector {
    grid-template-columns: repeat(3, 1fr);
  }

  .fg-step-header {
    grid-template-columns: 1fr;
  }

  .fg-mini-gem {
    display: none;
  }

  .fg-project-selector {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .fg-gem-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .fg-form-shell {
    padding: 24px 16px;
  }

  .fg-form-hero h2,
  .fg-step-title h2 {
    font-size: 42px;
  }

  .fg-progress-main,
  .fg-progress-periods {
    grid-template-columns: 1fr;
  }

  .fg-form-actions {
    flex-direction: column-reverse;
  }

  .fg-form-actions button,
  .fg-project-footer-actions .fg-back {
    width: 100%;
  }
}
